mirror of
https://github.com/huashengdun/webssh.git
synced 2026-08-20 04:36:42 +00:00
Update Dockerfile
For security reasons, run the Docker container as an unprivileged user
This commit is contained in:
+8
-1
@@ -1,5 +1,12 @@
|
||||
FROM python:3.7-slim
|
||||
ADD . /code
|
||||
WORKDIR /code
|
||||
RUN pip install -r requirements.txt
|
||||
RUN \
|
||||
groupadd -r webssh && \
|
||||
useradd -r -s /bin/false -g webssh webssh && \
|
||||
chown -R webssh:webssh /code && \
|
||||
pip install -r requirements.txt
|
||||
|
||||
EXPOSE 8888/tcp
|
||||
USER webssh
|
||||
CMD ["python", "run.py"]
|
||||
|
||||
Reference in New Issue
Block a user