Skip to content

Commit

Permalink
Write files with umask 0002 in Docker container (#24)
Browse files Browse the repository at this point in the history
* Set umask in entrypoint

* Update changelog

* Add subsection to CHANGELOG
  • Loading branch information
albireox authored Jul 23, 2024
1 parent 1e09ef9 commit 11ce8e6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## Next version

### ✨ Improved

* [#24](https://github.com/sdss/lvmguider/pull/24) Ensure group write permissions for new files in Docker container.


## 0.5.3 - June 1, 2024

### 🔧 Fixed
Expand Down
7 changes: 6 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ RUN cd lvmguider && pip3 install .
RUN rm -Rf lvmguider

# Set umask so that new files inherit the parent folder permissions.
# Not sure this works so we are also setting the permissions in the entrypoint.
RUN echo "umask 0002" >> /etc/bash.bashrc

ENTRYPOINT pip3 install -U astropy-iers-data; lvmguider actor start --debug
COPY ./docker/docker-entrypoint.sh /
RUN ["chmod", "+x", "/docker-entrypoint.sh"]

ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["sh", "-c", "lvmguider actor start --debug"]
5 changes: 5 additions & 0 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
umask 0002

pip3 install -U astropy-iers-data
exec "$@"

0 comments on commit 11ce8e6

Please sign in to comment.