minor refactoring of @tbflw work

This commit is contained in:
Julien Neuhart
2019-06-21 13:32:46 +02:00
parent 97eff7f21d
commit 8ca9866440
10 changed files with 33 additions and 34 deletions

View File

@@ -96,11 +96,11 @@ COPY build/base/fonts.conf /etc/fonts/conf.d/100-gotenberg.conf
# | Default user
# |--------------------------------------------------------------------------
# |
# | TODO find a correct description for why we're doing this.
# | All processes in the Docker container will run as a dedicated
# | non-root user.
# |
RUN groupadd --gid 1001 gotenberg \
&& useradd --uid 1001 --gid gotenberg --shell /bin/bash --no-create-home gotenberg \
&& mkdir /gotenberg \
&& chown gotenberg: /gotenberg

View File

@@ -10,7 +10,7 @@ You may start it with:
$ docker run --rm -p 3000:3000 thecodingmachine/gotenberg:5
```
All processes in the docker container runs as a dedicated non-root user called `gotenberg` with user id `1001` from the working dir `/gotenberg`.
All processes in the Docker container runs as a dedicated non-root user called `gotenberg` with user id `1001` from the working dir `/gotenberg`.
> The API will be available at [http://localhost:3000](http://localhost:3000).
@@ -40,11 +40,11 @@ Otherwise the API will not be able to launch Google Chrome and LibreOffice (unoc
> The more resources are granted, the quicker will be the conversions.
Also, in the deployment spec of the pod, specify the uid `1001` of the user `gotenberg`:
Also, in the deployment spec of the pod, specify the uid `1001` of the user `gotenberg`:
```
securityContext:
privileged: false
runAsUser: 1001
securityContext:
privileged: false
runAsUser: 1001
```
In the following examples, we will assume your

View File

@@ -48,7 +48,7 @@ This environment variable accepts any string that can be turned into a port numb
## Debug logging of process startup
By default, stdout and stderr messages from the started processes are disabled.
By default, `stdout` and `stderr` messages from the started processes are disabled.
You may enable some debug logging from starting the process by setting the environment variable `DEBUG_PROCESS_STARTUP`.

View File

@@ -24,7 +24,6 @@ COPY cmd ./cmd
COPY go.sum go.sum
COPY go.mod go.mod
# Build our binary.
RUN go build -o /gotenberg/gotenberg -ldflags "-X main.version=${VERSION}" cmd/gotenberg/main.go