netmaker/Dockerfile
Sayan Mallick 3d7569b22b
Updated to go1.23 (#3096)
* Updated to go1.23

* Updated the go-version-file to have qoutes

* Updated the gravitl/go-builder to 1.23

* versioned tag in Dockerfile

* update go-builder workflow
2024-09-09 10:42:00 +04:00

18 lines
441 B
Docker

#first stage - builder
FROM gravitl/go-builder:1.23.0 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.20.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"]