-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix to permissions in docker container
- Loading branch information
Showing
8 changed files
with
46 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,4 @@ | |
|
||
!README.md | ||
!LICENSE | ||
!entrypoint.sh | ||
!entrypoint*.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
services: | ||
beets-flask-tests: | ||
container_name: beets-flask-tests | ||
hostname: beets-container | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
target: test | ||
args: | ||
# 502 is default on macos, 1000 on linux | ||
USER_ID: 502 | ||
GROUP_ID: 502 | ||
image: beets-flask-tests | ||
ports: | ||
- "5001:5001" | ||
- "5173:5173" | ||
volumes: | ||
- ./:/repo/ | ||
beets-flask-tests: | ||
container_name: beets-flask-tests | ||
hostname: beets-container | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
target: test | ||
image: beets-flask-tests | ||
ports: | ||
- "5001:5001" | ||
- "5173:5173" | ||
environment: | ||
# 502 is default on macos, 1000 on linux | ||
USER_ID: 502 | ||
GROUP_ID: 502 | ||
volumes: | ||
- ./:/repo/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/bin/sh | ||
|
||
echo "Running as" | ||
id | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
if [ ! -z "$USER_ID" ] && [ ! -z "$GROUP_ID" ]; then | ||
echo "Updating UID to $USER_ID and GID to $GROUP_ID" | ||
groupmod -g $GROUP_ID beetle | ||
usermod -u $USER_ID -g $GROUP_ID beetle | ||
chown -R beetle:beetle /home/beetle | ||
chown -R beetle:beetle /repo | ||
fi |