Capstone/docker/service.dockerfile

25 lines
438 B
Plaintext
Raw Permalink Normal View History

2023-11-19 21:51:05 -05:00
FROM golang:1.21-alpine AS builder
2023-11-19 10:37:45 -05:00
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
2023-11-19 21:51:05 -05:00
FROM amazonlinux:2023
2023-11-19 10:37:45 -05:00
2023-11-19 21:51:05 -05:00
COPY docker/resolv.conf /etc/resolv.conf
2023-11-19 10:37:45 -05:00
COPY --from=builder /build/service/main /bin/main
RUN mkdir -p /etc/capstone
COPY secrets/config.yaml /etc/capstone
EXPOSE "8080"
ENTRYPOINT ["/bin/main"]