2023-09-21 18:47:33 +03:00
|
|
|
FROM golang:1.21.1-alpine3.18 as builder
|
2023-07-12 00:50:31 +03:00
|
|
|
|
|
|
|
ARG GITCOMMIT=docker
|
|
|
|
ARG GITDATE=docker
|
|
|
|
ARG GITVERSION=docker
|
|
|
|
|
|
|
|
RUN apk add make jq git gcc musl-dev linux-headers
|
|
|
|
|
2023-07-18 20:21:19 +03:00
|
|
|
COPY ./op-ufm /app
|
2023-07-12 00:50:31 +03:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
RUN make ufm
|
|
|
|
|
|
|
|
FROM alpine:3.18
|
|
|
|
|
2023-07-18 20:21:19 +03:00
|
|
|
COPY --from=builder /app/entrypoint.sh /bin/entrypoint.sh
|
|
|
|
COPY --from=builder /app/bin/ufm /bin/ufm
|
2023-07-12 00:50:31 +03:00
|
|
|
|
|
|
|
RUN apk update && \
|
|
|
|
chmod +x /bin/entrypoint.sh
|
|
|
|
|
2023-09-07 01:15:32 +03:00
|
|
|
RUN apk add ca-certificates jq curl bind-tools
|
|
|
|
|
2023-07-12 00:50:31 +03:00
|
|
|
VOLUME /etc/ufm
|
|
|
|
|
2023-07-18 20:21:19 +03:00
|
|
|
EXPOSE 8080
|
2023-07-12 00:50:31 +03:00
|
|
|
|
|
|
|
ENTRYPOINT ["/bin/entrypoint.sh"]
|
2023-07-18 20:21:19 +03:00
|
|
|
CMD ["/bin/ufm", "/etc/ufm/config.toml"]
|