mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-09 06:35:23 +08:00
docker files need to be updated as go-builder is built on golang:1.19-alpine3.16 so base image for netmaker/netclient needs to be updated to apline3.16 as well
22 lines
589 B
Text
22 lines
589 B
Text
FROM gravitl/go-builder as builder
|
|
# add glib support daemon manager
|
|
WORKDIR /app
|
|
ARG version
|
|
|
|
COPY . .
|
|
|
|
ENV GO111MODULE=auto
|
|
|
|
RUN GOOS=linux CGO_ENABLED=0 /usr/local/go/bin/go build -ldflags="-X 'main.version=${version}'" -o netclient-app netclient/main.go
|
|
|
|
FROM alpine:3.16.2
|
|
|
|
WORKDIR /root/
|
|
|
|
RUN apk add --no-cache --update bash libmnl gcompat iptables openresolv iproute2 wireguard-tools
|
|
COPY --from=builder /app/netclient-app ./netclient
|
|
COPY --from=builder /app/scripts/netclient.sh .
|
|
RUN chmod 0755 netclient && chmod 0755 netclient.sh
|
|
|
|
|
|
ENTRYPOINT ["/bin/bash", "./netclient.sh"]
|