fake-smtp/misc/docker/Dockerfile

31 lines
587 B
Docker
Raw Normal View History

2022-11-22 22:18:28 +01:00
FROM golang:1.19 AS build
2020-04-17 17:53:01 +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 curl
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
FROM busybox
COPY --from=build /src/release/fake-smtp-linux-amd64 /app
WORKDIR /app
2020-06-17 23:48:56 +02:00
RUN mkdir -p /app
2022-11-22 22:18:28 +01:00
EXPOSE 8080 2525
2020-06-17 23:48:56 +02:00
CMD ["bin/fake-smtp", "--config", "config.yml"]