Docs: docker readme: Build the image with build arguments

This commit is contained in:
Quentin McGaw (desktop) 2021-08-04 10:23:19 -04:00
parent 76a5c1a84e
commit ce263e49eb

View File

@ -28,6 +28,8 @@ ## Setup
chmod 700 2fauth
```
💁 if you feel like using another ID, you can [build the image with build arguments](#Build-the-image-with-build-arguments).
1. Run the container interactively:
```sh
@ -84,6 +86,22 @@ ### Build the image for a specific commit
docker build -t 2fauth/2fauth https://github.com/Bubka/2FAuth.git#fba9e29bd4e3bb697296bb0bde60ae869537528b
```
### Build the image with build arguments
There are the following build arguments you can use to customize the image using `--build-arg key=value`:
| Build argument | Default | Description |
| --- | --- | --- |
| `UID` | 1000 | The UID of the user to run the container as |
| `GID` | 1000 | The GID of the user to run the container as |
| `DEBIAN_VERSION` | `buster-slim` | The Debian version to use |
| `PHP_VERSION` | `7.3-buster` | The PHP version to use to get composer dependencies |
| `COMPOSER_VERSION` | `2.1` | The version of composer to use |
| `SUPERVISORD_VERSION` | `v0.7.3` | The version of supervisord to use |
| `VERSION` | `unknown` | The version of the image |
| `CREATED` | `an unknown date` | The date of the image build time |
| `COMMIT` | `unknown` | The commit hash of the Git commit used |
## Implementation details
- The container is based on `debian:buster-slim`