Skip to content
Snippets Groups Projects
Commit 1bffe515 authored by Moul's avatar Moul
Browse files

docker: remove user creation and usage

parent 155d7c4a
No related branches found
No related tags found
No related merge requests found
......@@ -17,20 +17,21 @@ RUN poetry install
FROM registry.duniter.org/docker/python3/poetry/3.9:latest
# Create silkaj group and user
RUN addgroup -S -g 1111 silkaj && \
adduser -SD -h /silkaj -G silkaj -u 1111 silkaj
#RUN addgroup -S -g 1111 silkaj && \
# adduser -SD -h /silkaj -G silkaj -u 1111 silkaj
# Copy the build artifact from the build stage
COPY --from=build --chown=silkaj:silkaj /silkaj /silkaj
#COPY --from=build --chown=silkaj:silkaj /silkaj /silkaj
COPY --from=build /silkaj /silkaj
# Set up alias to directly get silkaj command
# https://stackoverflow.com/a/3638886
RUN printf '#!/bin/bash\npoetry run silkaj "$@"' > /usr/bin/silkaj && \
chmod +x /usr/bin/silkaj && \
chown silkaj: /usr/bin/silkaj
chmod +x /usr/bin/silkaj #&& \
# chown silkaj: /usr/bin/silkaj
# Use silkaj user
USER silkaj
#USER silkaj
WORKDIR /silkaj
CMD ["/usr/bin/silkaj"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment