Skip to content

Commit

Permalink
Sync Dockerfiles for armhf/arm64
Browse files Browse the repository at this point in the history
This may relate to the issue reported in #506

The armhf Dockerfile did not get the change to move to a non-root
user, which was applied some time back to x86_64.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Sep 12, 2019
1 parent 9e0be38 commit c741c5a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 6 deletions.
21 changes: 18 additions & 3 deletions Dockerfile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,28 @@ RUN gofmt -l -d $(find . -type f -name '*.go' -not -path "./vendor/*") \

FROM alpine:3.10 as ship

RUN apk --no-cache add ca-certificates
WORKDIR /root/
LABEL org.label-schema.license="MIT" \
org.label-schema.vcs-url="https://github.com/openfaas/faas-netes" \
org.label-schema.vcs-type="Git" \
org.label-schema.name="openfaas/faas-netes" \
org.label-schema.vendor="openfaas" \
org.label-schema.docker.schema-version="1.0"

RUN addgroup -S app \
&& adduser -S -g app app \
&& apk --no-cache add \
ca-certificates

WORKDIR /home/app

EXPOSE 8080

ENV http_proxy ""
ENV https_proxy ""

COPY --from=build /go/src/github.com/openfaas/faas-netes/faas-netes .
COPY --from=0 /go/src/github.com/openfaas/faas-netes/faas-netes .
RUN chown -R app:app ./

USER app

CMD ["./faas-netes"]
21 changes: 18 additions & 3 deletions Dockerfile.armhf
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,28 @@ RUN gofmt -l -d $(find . -type f -name '*.go' -not -path "./vendor/*") \

FROM alpine:3.10 as ship

RUN apk --no-cache add ca-certificates
WORKDIR /root/
LABEL org.label-schema.license="MIT" \
org.label-schema.vcs-url="https://github.com/openfaas/faas-netes" \
org.label-schema.vcs-type="Git" \
org.label-schema.name="openfaas/faas-netes" \
org.label-schema.vendor="openfaas" \
org.label-schema.docker.schema-version="1.0"

RUN addgroup -S app \
&& adduser -S -g app app \
&& apk --no-cache add \
ca-certificates

WORKDIR /home/app

EXPOSE 8080

ENV http_proxy ""
ENV https_proxy ""

COPY --from=build /go/src/github.com/openfaas/faas-netes/faas-netes .
COPY --from=0 /go/src/github.com/openfaas/faas-netes/faas-netes .
RUN chown -R app:app ./

USER app

CMD ["./faas-netes"]

0 comments on commit c741c5a

Please sign in to comment.