Skip to content

Commit da95bb6

Browse files
authored
Create README.md
1 parent 4c94c7b commit da95bb6

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Docker Commons
2+
Common script/settings for docker containers.
3+
4+
## Entrypoint
5+
`entrypoint.sh` setup a [user](#user-setup) and a work directory with the proper permissions.
6+
If the image where `entrypoint.sh` is being used has a `EXECAPP` defined, the
7+
`entrypoint.sh` executes `EXECAPP` by the requested user, at `WORKDIR` using
8+
the positional arguments given through `docker run` command.
9+
10+
### user setup
11+
When running the `docker run` command, the user can specify a user name, uid and gid through
12+
the variables `DOCKER_USER`, `DOCKER_UID`, `DOCKER_GID`, respectively.
13+
14+
For example:
15+
```
16+
# docker run -it -e DOCKER_USER='brandt' -e DOCKER_UID=500 -e DOCKER_GID=100 chbrandt/heasoft
17+
```
18+
This will run the image `chbrandt/heasoft` (which uses `entrypoint.sh`) as user `brandt`, that
19+
has `uid=500` and `gid=100`.
20+
21+
[]
22+
Carlos

0 commit comments

Comments
 (0)