32 lines
710 B
Docker
32 lines
710 B
Docker
FROM reg.cadoles.com/proxy_cache/library/golang:1.21 AS build
|
|
|
|
ARG HTTP_PROXY=
|
|
ARG HTTPS_PROXY=
|
|
ARG http_proxy=
|
|
ARG https_proxy=
|
|
|
|
RUN apt-get update && apt-get install -y build-essential git bash curl
|
|
|
|
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - \
|
|
&& apt-get install -y nodejs
|
|
|
|
COPY . /src
|
|
|
|
WORKDIR /src
|
|
|
|
RUN cp -f misc/docker/config-patch.txt misc/release/config-patch.txt \
|
|
&& npm ci \
|
|
&& make ARCH_TARGETS=amd64 release
|
|
|
|
FROM reg.cadoles.com/proxy_cache/library/busybox
|
|
|
|
RUN adduser -D -h /app fsmtp
|
|
|
|
COPY --from=build /src/release/fake-smtp-linux-amd64 /app
|
|
RUN chown -R fsmtp:fsmtp /app
|
|
|
|
EXPOSE 8080 2525
|
|
USER fsmtp
|
|
WORKDIR /app
|
|
|
|
CMD ["bin/fake-smtp", "--config", "config.yml"] |