Skip to content

Commit

Permalink
🔒 Make in-container root directory writable by all
Browse files Browse the repository at this point in the history
  • Loading branch information
shnizzedy committed Apr 14, 2023
1 parent 79e1be3 commit 6efb38d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 18 deletions.
11 changes: 6 additions & 5 deletions .github/Dockerfiles/C-PAC.develop-ABCD-HCP-bionic.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ RUN rm -Rf /code/docker_data/Dockerfiles && \
ENTRYPOINT ["/code/run-with-freesurfer.sh"]

# Link libraries for Singularity images
RUN ldconfig

RUN apt-get clean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN ldconfig \
&& apt-get clean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& chmod 777 / \
&& chmod 777 $(ls / | grep -v sys | grep -v proc)

# set user
# USER c-pac_user
7 changes: 4 additions & 3 deletions .github/Dockerfiles/C-PAC.develop-bionic.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ RUN rm -Rf /code/docker_data/Dockerfiles && \
ENTRYPOINT ["/code/run-with-freesurfer.sh"]

# link libraries & clean up
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
ldconfig && \
chmod 777 $(ls / | grep -v sys | grep -v proc)
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& ldconfig \
&& chmod 777 / \
&& chmod 777 $(ls / | grep -v sys | grep -v proc)

# set user
# USER c-pac_user
15 changes: 8 additions & 7 deletions .github/Dockerfiles/C-PAC.develop-fMRIPrep-LTS-xenial.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ RUN rm -Rf /code/docker_data/Dockerfiles && \
ENTRYPOINT ["/code/run-with-freesurfer.sh"]

# link libraries & clean up
RUN sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen && \
apt-get clean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
ldconfig && \
chmod 777 $(ls / | grep -v sys | grep -v proc)
RUN sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& locale-gen \
&& apt-get clean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& ldconfig \
&& chmod 777 / \
&& chmod 777 $(ls / | grep -v sys | grep -v proc)

# set user
# USER c-pac_user
7 changes: 4 additions & 3 deletions .github/Dockerfiles/C-PAC.develop-lite-bionic.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ RUN rm -Rf /code/docker_data/Dockerfiles && \
ENTRYPOINT ["/code/run.py"]

# link libraries & clean up
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
ldconfig && \
chmod 777 $(ls / | grep -v sys | grep -v proc)
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& ldconfig \
&& chmod 777 / \
&& chmod 777 $(ls / | grep -v sys | grep -v proc)

# set user
# USER c-pac_user
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Adds checksum steps to `curl`d steps in Docker build process (for standard and `lite` images)
- Makes in-container root directory writable by all

### Added dependency

Expand Down

0 comments on commit 6efb38d

Please sign in to comment.