Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ COPY registry /srv/registry/

ENV PYTHONUNBUFFERED=1
ENV CONFIG_DIR=/srv
ENV NO_CHOWN=1
#ENTRYPOINT ["/opt/registry/run_local.sh"]
#CMD ["--host=0.0.0.0"]
1 change: 1 addition & 0 deletions Dockerfile.testing
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ COPY logrotate-http.conf /etc/logrotate.d/httpd
COPY examples/apache.conf /etc/httpd/conf.d/

ENV CONFIG_DIR=/srv
ENV NO_CHOWN=1
#ENTRYPOINT ["/opt/registry/run_local.sh"]
#CMD ["--host=0.0.0.0"]
7 changes: 4 additions & 3 deletions register.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,10 @@ def request_token(pool, resource, scopes=None, local_dir=None):

print("Token was written to {}".format(msg_path))
if is_admin():
logger.debug("Correcting token file permissions...")
shutil.chown(token_path, user=TOKEN_OWNER_USER, group=TOKEN_OWNER_GROUP)
logger.debug("Corrected token file permissions...")
if not os.environ.get("NO_CHOWN"):
logger.debug("Correcting token file permissions...")
shutil.chown(token_path, user=TOKEN_OWNER_USER, group=TOKEN_OWNER_GROUP)
logger.debug("Corrected token file permissions...")
else:
print(NONROOT_TOKEN_MSG.format(path=msg_path, name=token_name))

Expand Down