netmaker/Dockerfile
Matthew R Kasun 0bc39f10d8 missing quote
2021-11-21 09:06:17 -05:00

19 lines
472 B
Docker

#first stage - builder
FROM golang:1.15 as builder
ARG version
WORKDIR /app
COPY . .
ENV GO111MODULE=auto
RUN GOOS=linux CGO_ENABLED=1 go build -ldflags="-s -X 'main.version=$version'" -o netmaker main.go
FROM alpine:3.13.6
# add a c lib
RUN apk add gcompat iptables
# set the working directory
WORKDIR /root/
RUN mkdir -p /etc/netclient/config
COPY --from=builder /app/netmaker .
COPY --from=builder /app/config config
EXPOSE 8081
EXPOSE 50051
ENTRYPOINT ["./netmaker"]