fake-smtp/misc/docker/Dockerfile

32 lines
710 B
Docker
Raw Permalink Normal View History

2024-02-27 17:14:25 +01:00
FROM reg.cadoles.com/proxy_cache/library/golang:1.21 AS build
2020-04-17 17:53:01 +02:00
ARG HTTP_PROXY=
ARG HTTPS_PROXY=
ARG http_proxy=
ARG https_proxy=
2024-02-27 17:14:25 +01:00
RUN apt-get update && apt-get install -y build-essential git bash curl
2020-04-17 17:53:01 +02:00
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - \
2020-04-17 17:53:01 +02:00
&& apt-get install -y nodejs
COPY . /src
WORKDIR /src
2022-11-22 22:18:28 +01:00
RUN cp -f misc/docker/config-patch.txt misc/release/config-patch.txt \
&& npm ci \
2020-04-17 17:53:01 +02:00
&& make ARCH_TARGETS=amd64 release
2024-02-27 17:14:25 +01:00
FROM reg.cadoles.com/proxy_cache/library/busybox
2020-04-17 17:53:01 +02:00
RUN adduser -D -h /app fsmtp
2020-04-17 17:53:01 +02:00
COPY --from=build /src/release/fake-smtp-linux-amd64 /app
RUN chown -R fsmtp:fsmtp /app
2020-06-17 23:48:56 +02:00
2022-11-22 22:18:28 +01:00
EXPOSE 8080 2525
USER fsmtp
WORKDIR /app
2022-11-22 22:18:28 +01:00
2020-06-17 23:48:56 +02:00
CMD ["bin/fake-smtp", "--config", "config.yml"]