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
435 B
Docker
31 lines
435 B
Docker
# BUILD
|
|
FROM golang:1.18.8-alpine as build
|
|
|
|
WORKDIR /build
|
|
|
|
RUN apk update && apk upgrade && apk add --no-cache make git gcc musl-dev
|
|
|
|
COPY ./go.mod ./
|
|
COPY go.sum ./
|
|
RUN go mod download -x
|
|
|
|
COPY . ./
|
|
|
|
RUN make
|
|
|
|
|
|
# RUN
|
|
FROM alpine:latest 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" ]
|