2022-04-20 15:30:50 +02:00
|
|
|
FROM golang:1.17 AS build
|
2020-05-20 19:29:13 +02:00
|
|
|
|
|
|
|
ARG HTTP_PROXY=
|
|
|
|
ARG HTTPS_PROXY=
|
|
|
|
ARG http_proxy=
|
|
|
|
ARG https_proxy=
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y build-essential git bash
|
|
|
|
|
|
|
|
COPY . /src
|
|
|
|
|
|
|
|
WORKDIR /src
|
|
|
|
|
|
|
|
RUN make ARCH_TARGETS=amd64 release
|
|
|
|
|
2023-03-02 15:20:14 +01:00
|
|
|
FROM alpine as certs
|
|
|
|
|
|
|
|
RUN apk update && apk add ca-certificates
|
|
|
|
|
2020-05-20 19:29:13 +02:00
|
|
|
FROM busybox
|
|
|
|
|
|
|
|
COPY --from=build /src/release/server-linux-amd64 /app
|
|
|
|
|
2023-03-02 15:20:14 +01:00
|
|
|
COPY --from=certs /etc/ssl/certs /etc/ssl/certs
|
|
|
|
|
2020-05-20 19:29:13 +02:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
ENV HTTP_ADDRESS=:80
|
|
|
|
|
2023-03-02 15:20:14 +01:00
|
|
|
CMD ["bin/server", "-workdir", "/app", "-config", "server.yml"]
|