From ebfe99be795154144166507d95053371de5d4220 Mon Sep 17 00:00:00 2001
From: Julien Neuhart Gotenberg is shipped within a Docker image. It uses a dedicated non-root user called You may start it with: The API will be available at http://localhost:3000. The image uses a dedicated non-root user called If you wish to change those uid and gid, you will have to: For instance: You may also add it in your Docker Compose stack: The more resources are granted, the quicker will be the conversions. In the deployment specification of the pod, also specify the uid In the deployment specification of the pod, also specify the uid of the user
-
-
gotenberg with uid and gid 1001.$ docker run --rm -p 3000:3000 thecodingmachine/gotenberg:6
+
$ docker run --rm -p 3000:3000 thecodingmachine/gotenberg:6
+gotenberg with uid and gid 1001.
+
+
+$ git clone https://github.com/thecodingmachine/gotenberg.git
+$ make publish GOTENBERG_USER_GID=your_custom_gid GOTENBERG_USER_UID=your_custom_uid DOCKER_REGISTRY=your_registry DOCKER_USER=registry_user DOCKER_PASSWORD=registry_password VERSION=6.1.0
+
+
+
+
+
master branch is always up-to-date with the latest version of the API.Docker Compose
version: '3'
+
version: '3'
-services:
+services:
# your others services
- gotenberg:
- image: thecodingmachine/gotenberg:6
+ gotenberg:
+ image: thecodingmachine/gotenberg:6
@@ -177,7 +193,7 @@
-1001 of the user gotenberg:gotenberg:securityContext:
privileged: false
@@ -657,8 +673,8 @@ $client->store($request, $dest);
--url http://localhost:3000/convert/html \
--header 'Content-Type: multipart/form-data' \
--form files=@index.html \
- --form paperWidth=8.27 \
- --form paperHeight=11.69 \
+ --form paperWidth=8.27 \
+ --form paperHeight=11.69 \
--form marginTop=0 \
--form marginBottom=0 \
--form marginLeft=0 \
@@ -723,7 +739,7 @@ a lot on JavaScript for rendering.
504 HTTP code.
--url http://localhost:3000/convert/html \
--header 'Content-Type: multipart/form-data' \
--form files=@index.html \
- --form waitTimeout=2.5
+ --form waitTimeout=2.5
For instance, using the following Docker Compose file:
-version: '3' +version: '3' -services: +services: # your others services - gotenberg: - image: thecodingmachine/gotenberg:6 + gotenberg: + image: thecodingmachine/gotenberg:6You may now launch your services using:
diff --git a/scripts/publish.sh b/scripts/publish.sh index 009fce2d..74e0073d 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -4,7 +4,7 @@ set -e GOLANG_VERSION="$1" TINI_VERSION="$2" -DOCKER_REPOSITORY="$3" +DOCKER_REGISTRY="$3" VERSION="$4" DOCKER_USER="$5" DOCKER_PASSWORD="$6" @@ -23,13 +23,13 @@ fi docker build \ --build-arg VERSION=${VERSION} \ --build-arg TINI_VERSION=${TINI_VERSION} \ - -t ${DOCKER_REPOSITORY}/gotenberg:latest \ - -t ${DOCKER_REPOSITORY}/gotenberg:${SEMVER[0]} \ - -t ${DOCKER_REPOSITORY}/gotenberg:${SEMVER[0]}.${SEMVER[1]} \ - -t ${DOCKER_REPOSITORY}/gotenberg:${SEMVER[0]}.${SEMVER[1]}.${SEMVER[2]} \ + -t ${DOCKER_REGISTRY}/gotenberg:latest \ + -t ${DOCKER_REGISTRY}/gotenberg:${SEMVER[0]} \ + -t ${DOCKER_REGISTRY}/gotenberg:${SEMVER[0]}.${SEMVER[1]} \ + -t ${DOCKER_REGISTRY}/gotenberg:${SEMVER[0]}.${SEMVER[1]}.${SEMVER[2]} \ -f build/package/Dockerfile . -docker push "${DOCKER_REPOSITORY}/gotenberg:latest" -docker push "${DOCKER_REPOSITORY}/gotenberg:${SEMVER[0]}" -docker push "${DOCKER_REPOSITORY}/gotenberg:${SEMVER[0]}.${SEMVER[1]}" -docker push "${DOCKER_REPOSITORY}/gotenberg:${SEMVER[0]}.${SEMVER[1]}.${SEMVER[2]}" \ No newline at end of file +docker push "${DOCKER_REGISTRY}/gotenberg:latest" +docker push "${DOCKER_REGISTRY}/gotenberg:${SEMVER[0]}" +docker push "${DOCKER_REGISTRY}/gotenberg:${SEMVER[0]}.${SEMVER[1]}" +docker push "${DOCKER_REGISTRY}/gotenberg:${SEMVER[0]}.${SEMVER[1]}.${SEMVER[2]}" \ No newline at end of file diff --git a/scripts/tests.sh b/scripts/tests.sh index 3824cc6d..814d50f0 100755 --- a/scripts/tests.sh +++ b/scripts/tests.sh @@ -2,15 +2,15 @@ set -e -DOCKER_REPOSITORY="$1" +DOCKER_REGISTRY="$1" CODE_COVERAGE="$2" touch "$PWD/coverage.txt" chmod 777 "$PWD/coverage.txt" -docker build -t "$DOCKER_REPOSITORY/gotenberg:tests" -f build/tests/Dockerfile . +docker build -t "$DOCKER_REGISTRY/gotenberg:tests" -f build/tests/Dockerfile . if [ "$CODE_COVERAGE" = "1" ]; then - docker run --rm -e "CODE_COVERAGE=$CODE_COVERAGE" -v "$PWD/coverage.txt:/gotenberg/tests/coverage.txt" "$DOCKER_REPOSITORY/gotenberg:tests" + docker run --rm -e "CODE_COVERAGE=$CODE_COVERAGE" -v "$PWD/coverage.txt:/gotenberg/tests/coverage.txt" "$DOCKER_REGISTRY/gotenberg:tests" else - docker run --rm -e "CODE_COVERAGE=$CODE_COVERAGE" "$DOCKER_REPOSITORY/gotenberg:tests" + docker run --rm -e "CODE_COVERAGE=$CODE_COVERAGE" "$DOCKER_REGISTRY/gotenberg:tests" fi \ No newline at end of file