Skip to content

Commit

Permalink
Merge pull request #11 from IBM/revert-10-feat/non_root
Browse files Browse the repository at this point in the history
Revert "wip"
  • Loading branch information
LiyangW authored Oct 14, 2022
2 parents 8b1ba9b + 8e69d43 commit b2a401f
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions backwork/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,7 @@ RUN python -m pip install --upgrade pip
RUN pip install setuptools==57.5.0
RUN pip install -r ./requirements.txt

# install sudo as root
RUN apk add --no-cache --update sudo

# add new user
RUN adduser -D myapp \
&& echo "myapp ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/myapp \
&& chmod 0440 /etc/sudoers.d/myapp

COPY --chown=myapp ./docker-entrypoint.sh /
RUN mkdir /backups && chown myapp /backups
USER myapp
COPY ./docker-entrypoint.sh /

VOLUME ["/backups"]
ENTRYPOINT ["/sbin/tini", "--"]
Expand Down

0 comments on commit b2a401f

Please sign in to comment.