mirror of
https://github.com/gravitl/netmaker.git
synced 2024-11-10 17:48:25 +08:00
18 lines
434 B
Docker
18 lines
434 B
Docker
#first stage - builder
|
|
FROM gravitl/go-builder as builder
|
|
ARG tags
|
|
WORKDIR /app
|
|
COPY . .
|
|
|
|
RUN GOOS=linux CGO_ENABLED=1 go build -ldflags="-s -w " -tags ${tags} .
|
|
# RUN go build -tags=ee . -o netmaker main.go
|
|
FROM alpine:3.16.2
|
|
|
|
# add a c lib
|
|
# 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
|
|
ENTRYPOINT ["./netmaker"]
|