mirror of
https://github.com/gravitl/netmaker.git
synced 2026-10-12 02:15:06 +00:00
22 lines
510 B
Docker
22 lines
510 B
Docker
#first stage - builder
|
|
FROM gravitl/go-builder:1.26.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.24.1
|
|
|
|
# add a c lib
|
|
# set the working directory
|
|
WORKDIR /root/
|
|
RUN apk upgrade --no-cache
|
|
RUN apk add --no-cache sqlite
|
|
RUN mkdir -p /etc/netclient/config
|
|
COPY --from=builder /app/netmaker .
|
|
COPY --from=builder /app/config config
|
|
EXPOSE 8081
|
|
EXPOSE 6060
|
|
ENTRYPOINT ["./netmaker"]
|