fake-smtp/misc/docker/Dockerfile

34 lines
704 B
Docker
Raw Normal View History

2022-02-18 10:24:46 +01:00
FROM golang:1.17 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
2022-02-18 10:24:46 +01:00
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
2020-04-17 17:53:01 +02:00
&& apt-get install -y nodejs
COPY . /src
WORKDIR /src
2020-06-17 23:48:56 +02:00
RUN cp -f misc/docker/config-patch.yml misc/release/config-patch.yml
RUN go get github.com/krishicks/yaml-patch/cmd/yaml-patch
2020-04-17 17:53:01 +02:00
RUN npm install \
&& make vendor \
2020-06-17 23:48:56 +02:00
&& echo "---" > ./misc/release/config-patch.yml \
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
CMD ["bin/fake-smtp", "--config", "config.yml"]