netmaker/Dockerfile
Vishal Dalwadi 131025a23e Merge branch 'develop' into task/schema-changes
# Conflicts:
#	go.sum
#	logic/hosts.go
#	logic/networks.go
#	pro/controllers/networks.go
#	pro/controllers/users.go
2025-08-14 23:07:16 +05:30

20 lines
506 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} json1" .
# RUN go build -tags=ee . -o netmaker main.go
FROM alpine:3.22.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
ENTRYPOINT ["./netmaker"]