You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
459 B
Docker
31 lines
459 B
Docker
# BUILD
|
|
FROM golang:1.18.10-alpine3.17 as build
|
|
|
|
WORKDIR /build
|
|
|
|
RUN apk add --no-cache make=4.3-r1 git=2.38.3-r1 gcc=12.2.1_git20220924-r4 musl-dev=1.2.3-r4
|
|
|
|
COPY ./go.mod ./
|
|
COPY go.sum ./
|
|
RUN go mod download -x
|
|
|
|
COPY . ./
|
|
|
|
RUN make
|
|
|
|
|
|
# RUN
|
|
FROM alpine:3.17.1 as run
|
|
|
|
WORKDIR /
|
|
|
|
COPY --from=build /build/dist/bin/* /usr/local/bin/
|
|
|
|
COPY ./entrypoint.sh /
|
|
RUN chmod 755 /entrypoint.sh && mkdir -p /data/
|
|
|
|
VOLUME /data
|
|
EXPOSE 80/tcp
|
|
|
|
CMD [ "/entrypoint.sh" ]
|