Capstone/docker/service.dockerfile

24 lines
394 B
Plaintext
Raw Normal View History

2023-11-19 10:37:45 -05:00
from golang:1.21-alpine as builder
WORKDIR /build/service
COPY service/go.mod service/go.sum ./
COPY ./ui ../ui
COPY ./libs ../libs
RUN go mod download
COPY ./service .
2023-11-19 10:51:38 -05:00
RUN GOEXPERIMENT=loopvar go build -o main
2023-11-19 10:37:45 -05:00
FROM alpine:latest
COPY --from=builder /build/service/main /bin/main
RUN mkdir -p /etc/capstone
COPY secrets/config.yaml /etc/capstone
EXPOSE "8080"
ENTRYPOINT ["/bin/main"]