Skip to content

Commit

Permalink
Merge pull request #13 from dicoding-dev/clean-up-user
Browse files Browse the repository at this point in the history
Clean up user
  • Loading branch information
habibimustafa committed Oct 10, 2023
2 parents cf8c7fe + cf70ebe commit e5d8a3f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
FROM node:18-slim

ARG AGRSGROUP=1004

RUN apt-get update && apt-get install -y gosu

RUN groupadd --force -g $AGRSGROUP assistest
RUN useradd -ms /bin/bash --no-user-group -g $AGRSGROUP -u 1337 assistest
RUN useradd -ms /bin/bash assistest

RUN mkdir /home/assistest/app && chown -R assistest:assistest /home/assistest/app
RUN mkdir /home/assistest/student-app && chown -R assistest:assistest /home/assistest/student-app
Expand Down
5 changes: 0 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
#!/bin/bash

if [ ! -z "$AGRSUSER" ]; then
usermod -u $AGRSUSER assistest
fi

rm -f /home/assistest/reports/report.json || true
chown -R assistest:assistest /home/assistest/student-app
exec gosu assistest "$@"

0 comments on commit e5d8a3f

Please sign in to comment.