Skip to content

Commit

Permalink
FIXUP: Separate some Dockerfile commands
Browse files Browse the repository at this point in the history
  • Loading branch information
apyrgio committed Jan 14, 2025
1 parent 96ab442 commit cbeb103
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,14 @@ RUN mkdir /libreoffice_ext && cd libreoffice_ext \
&& rm /root/.wget-hsts

# Create an unprivileged user both for gVisor and for running Dangerzone.
RUN mkdir -p /opt/dangerzone/dangerzone && \
touch /opt/dangerzone/dangerzone/__init__.py && \
addgroup --gid 1000 dangerzone && \
adduser --uid 1000 --ingroup dangerzone --shell /bin/true \
--disabled-password --home /home/dangerzone dangerzone
RUN addgroup --gid 1000 dangerzone
RUN adduser --uid 1000 --ingroup dangerzone --shell /bin/true \
--disabled-password --home /home/dangerzone dangerzone

# Copy Dangerzone's conversion logic under /opt/dangerzone, and allow Python to
# import it.
RUN mkdir -p /opt/dangerzone/dangerzone
RUN touch /opt/dangerzone/dangerzone/__init__.py

COPY conversion/doc_to_pixels.py \
conversion/common.py \
Expand Down
13 changes: 8 additions & 5 deletions Dockerfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,14 @@ RUN mkdir /libreoffice_ext && cd libreoffice_ext \
&& rm /root/.wget-hsts

# Create an unprivileged user both for gVisor and for running Dangerzone.
RUN mkdir -p /opt/dangerzone/dangerzone && \
touch /opt/dangerzone/dangerzone/__init__.py && \
addgroup --gid 1000 dangerzone && \
adduser --uid 1000 --ingroup dangerzone --shell /bin/true \
--disabled-password --home /home/dangerzone dangerzone
RUN addgroup --gid 1000 dangerzone
RUN adduser --uid 1000 --ingroup dangerzone --shell /bin/true \
--disabled-password --home /home/dangerzone dangerzone

# Copy Dangerzone's conversion logic under /opt/dangerzone, and allow Python to
# import it.
RUN mkdir -p /opt/dangerzone/dangerzone
RUN touch /opt/dangerzone/dangerzone/__init__.py

COPY conversion/doc_to_pixels.py \
conversion/common.py \
Expand Down

0 comments on commit cbeb103

Please sign in to comment.