Non root user and fwatchdow standarization

AlpineFunction additional Dockerfiles
Fix Coffe, node nonroot user and change workdir
DnCore nonroot and updated to 2.1, new README
Fix golang user and watchdog
Java user and watchdog fix
Watchdog and user for node image
Fix python user and watchdog
Fix R username and watchdog
Captainsintent user and fwatchdog
ChangeColorIntent change username, fwatchdog and directory
CHelloWorld remove tmp, disabled lock, fwatchdog and user
DockerHubStats user, fwatchdog and dependencies
Change figlet to use base alpine image
Improve figlet ARM
Set base image GIF-Maker
MarkDownRender change base image
NodeInfo change base image
PhantomJS user and fwatchdog
Resize Image
SentimentAnalysis user and watchdog
WebhookStach change root image
Replace user faas with app
Upgrade alpine to latest version
Revert vendor folders
Upgrade alpine:3.9
This commit is contained in:
Pau Rosello
2019-06-26 11:35:02 +02:00
committed by Alex Ellis
parent e8b3818300
commit 2b37a0133a
31 changed files with 181 additions and 150 deletions

View File

@ -1,10 +1,12 @@
FROM alpine:3.8 as builder
RUN apk add --no-cache curl \
&& curl -SL https://github.com/openfaas/faas/releases/download/0.13.0/fwatchdog > /usr/bin/fwatchdog \
&& chmod +x /usr/bin/fwatchdog \
&& apk --no-cache del curl
FROM openfaas/classic-watchdog:0.14.4 as watchdog
WORKDIR /root/
FROM alpine:3.10 as builder
COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog
WORKDIR /application/
RUN addgroup -g 1000 -S app && adduser -u 1000 -S app -G app
RUN apk add --no-cache gcc \
musl-dev
@ -18,11 +20,13 @@ FROM scratch
COPY --from=builder /main /
COPY --from=builder /usr/bin/fwatchdog /
COPY --from=builder /tmp /tmp
ENV fprocess="/main"
ENV suppress_lock=true
HEALTHCHECK --interval=5s CMD [ -e /tmp/.lock ] || exit 1
COPY --from=builder /etc/passwd /etc/passwd
CMD ["/fwatchdog"]
USER 1000
CMD ["fwatchdog"]