Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unsuccessful setting of readonly bash variable by using different name than UID #319

Merged
merged 1 commit into from
Aug 22, 2019

Conversation

juhoinkinen
Copy link
Member

In the wiki section for docker-compose.yml it was instructed to run command

ANNIF_PROJECTS=~/annif-projects UID=${UID} GID=${GID} docker-compose up

to start up the services, which set UID and GID variables which in turn were intended to be used for setting user in containers. However this was actually failing with the warning

bash: UID: readonly variable
WARNING: The UID variable is not set. Defaulting to a blank string.

and the user remained root in the containers.

This is fixed by using different name than UID in the docker-compose.yml and the instruction in Wiki.

@codecov
Copy link

codecov bot commented Aug 22, 2019

Codecov Report

Merging #319 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #319   +/-   ##
=======================================
  Coverage   99.37%   99.37%           
=======================================
  Files          55       55           
  Lines        2867     2867           
=======================================
  Hits         2849     2849           
  Misses         18       18

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2625edb...9807506. Read the comment docs.

@juhoinkinen juhoinkinen merged commit d67c082 into master Aug 22, 2019
@TommiRTVA
Copy link

I have noticed that this setting is not needed or even possible to set when using Docker for Windows?

"On Docker for Windows it is not necessary to change uid and gid in your .env file.
Docker for Windows is internally using network shares (SMB) to mount Docker volumes. This does not require to syncronize file and directoriy permissions via uid and gid."

https://devilbox.readthedocs.io/en/latest/howto/uid-and-gid/find-uid-and-gid-on-win.html

@juhoinkinen juhoinkinen added this to the 0.42 milestone Sep 2, 2019
@juhoinkinen juhoinkinen deleted the fix-unsuccessful-set-of-readonly-variable-UID branch September 25, 2019 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants