Install source code when making a Docker container

This commit is contained in:
Benjamin Sergeant 2020-01-04 13:44:02 -08:00
parent c7fc4f0f8e
commit 221087ffff

View File

@ -15,6 +15,7 @@ WORKDIR /opt
USER app USER app
RUN [ "make", "ws_install" ] RUN [ "make", "ws_install" ]
RUN [ "rm", "-rf", "build" ]
FROM alpine:3.11 as runtime FROM alpine:3.11 as runtime
@ -26,6 +27,9 @@ COPY --chown=app:app --from=build /usr/local/bin/ws /usr/local/bin/ws
RUN chmod +x /usr/local/bin/ws RUN chmod +x /usr/local/bin/ws
RUN ldd /usr/local/bin/ws RUN ldd /usr/local/bin/ws
# Copy source code for gcc
COPY --chown=app:app --from=build /opt /opt
# Now run in usermode # Now run in usermode
USER app USER app
WORKDIR /home/app WORKDIR /home/app