fix(docker): image now builds
adding non root user execution capabilities
This commit is contained in:
parent
1ce43d2c76
commit
f7bff1b697
|
@ -1,11 +1,11 @@
|
||||||
FROM golang:1.19 AS build
|
FROM reg.cadoles.com/dh/library/golang:1.17 AS build
|
||||||
|
|
||||||
ARG HTTP_PROXY=
|
ARG HTTP_PROXY=
|
||||||
ARG HTTPS_PROXY=
|
ARG HTTPS_PROXY=
|
||||||
ARG http_proxy=
|
ARG http_proxy=
|
||||||
ARG https_proxy=
|
ARG https_proxy=
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y build-essential git bash curl
|
RUN apt-get update && apt-get install -y build-essential git bash curl npm python2
|
||||||
|
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - \
|
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - \
|
||||||
&& apt-get install -y nodejs
|
&& apt-get install -y nodejs
|
||||||
|
@ -20,12 +20,13 @@ RUN cp -f misc/docker/config-patch.txt misc/release/config-patch.txt \
|
||||||
|
|
||||||
FROM busybox
|
FROM busybox
|
||||||
|
|
||||||
|
RUN adduser -D -h /app fsmtp
|
||||||
|
|
||||||
COPY --from=build /src/release/fake-smtp-linux-amd64 /app
|
COPY --from=build /src/release/fake-smtp-linux-amd64 /app
|
||||||
|
RUN chown -R fsmtp:fsmtp /app
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
RUN mkdir -p /app
|
|
||||||
|
|
||||||
EXPOSE 8080 2525
|
EXPOSE 8080 2525
|
||||||
|
USER fsmtp
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
CMD ["bin/fake-smtp", "--config", "config.yml"]
|
CMD ["bin/fake-smtp", "--config", "config.yml"]
|
Loading…
Reference in New Issue