add frontlas docker images

This commit is contained in:
singchia
2024-05-06 23:14:02 +08:00
parent 3529d88a78
commit c1f8dda576

View File

@@ -0,0 +1,28 @@
FROM golang:1.22.0 AS builder
# an automatic platform ARG enabled by Docker BuildKit.
ARG TARGETOS
# an automatic platform ARG enabled by Docker BuildKit.
ARG TARGETARCH
ENV GO111MODULE=on \
GOPROXY=https://goproxy.io,direct
WORKDIR /go/src/github.com/singchia/frontlas
RUN --mount=type=bind,readwrite,target=/go/src/github.com/singchia/frontlas \
make DESTDIR=/tmp/install all install-frontlas
FROM alpine:3.14
COPY --from=builder /tmp/install/ /
RUN apk --no-cache add ca-certificates wget
RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.34-r0/glibc-2.34-r0.apk
RUN apk add glibc-2.34-r0.apk
EXPOSE 30020
EXPOSE 30021
ENTRYPOINT ["/usr/bin/frontlas"]
CMD ["--config", "/usr/conf/frontlas.yaml"]