Skip to content

Commit a1c34b0

Browse files
[WebScripts 3.0.11]
1 parent 01d1644 commit a1c34b0

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

simple/Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.9
1+
FROM python:3.11
22

33
ARG PASS=Admin
44

@@ -8,20 +8,17 @@ RUN apt-get install -y sudo
88
RUN useradd --system --no-create-home --shell /bin/false WebScripts
99

1010
RUN cd /usr/src && python -m venv WebScripts
11-
RUN bash -c 'cd /usr/src/WebScripts && source bin/activate && pip install WebScripts --install-option "--owner=WebScripts" --install-option "--admin-password=${PASS}"'
11+
RUN bash -c 'cd /usr/src/WebScripts && source bin/activate && pip install WebScripts --install-option "--owner=WebScripts" --install-option "--admin-password=${PASS}" && python -m WebScripts.harden -p "${PASS}" -o "WebScripts" -d "."'
1212

1313
WORKDIR /usr/src/WebScripts
14-
RUN touch /usr/src/WebScripts/audit.html && touch /usr/src/WebScripts/audit.txt && touch /usr/src/WebScripts/audit.json && chown WebScripts:WebScripts /usr/src/WebScripts/audit.*
15-
16-
RUN echo "{}" > /usr/src/WebScripts/webscripts_file_integrity.json && echo "{}" > /usr/src/WebScripts/uploads_file_integrity.json && echo "{}" > /usr/src/WebScripts/logs_checks.json && chown WebScripts:WebScripts /usr/src/WebScripts/*_file_integrity.json /usr/src/WebScripts/logs_checks.json
1714

1815
RUN mkdir -p /usr/src/WebScripts/logs/
1916
RUN chown WebScripts:WebScripts /usr/src/WebScripts/logs/
2017

2118
RUN chown root:root /usr/src/WebScripts
2219

23-
RUN sed -i "s/192.168.\*,172.16.\*,10.\*,127.0.\*/*/" /usr/src/WebScripts/lib/python3.9/site-packages/WebScripts/data/users.csv
24-
VOLUME /usr/src/WebScripts/lib/python3.9/site-packages/WebScripts/data/
20+
RUN sed -i "s/192.168.\*,172.16.\*,10.\*,127.0.\*/*/" /usr/src/WebScripts/data/users.csv
21+
VOLUME /usr/src/WebScripts/data/
2522

2623
EXPOSE 80/tcp
2724

0 commit comments

Comments
 (0)