Skip to content

Commit

Permalink
Update config file path in Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
oneonestar committed Feb 20, 2025
1 parent e0493ae commit 854dbec
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN \
curl -#LfS "${JDK_DOWNLOAD_LINK}" | tar -zx --strip 1 -C "${JAVA_HOME}"

FROM ${TRINO_GATEWAY_BASE_IMAGE}
WORKDIR /opt/trino-gateway
WORKDIR /usr/lib/trino-gateway

ARG JDK_VERSION
ENV JAVA_HOME="/usr/lib/jvm/jdk-${JDK_VERSION}"
Expand All @@ -40,14 +40,14 @@ RUN \
microdnf install -y tar less shadow-utils && \
groupadd trino --gid 1000 && \
useradd trino --uid 1000 --gid 1000 --create-home && \
mkdir -p /usr/lib/trino-gateway && \
chown -R "trino:trino" /usr/lib/trino-gateway /opt/trino-gateway
mkdir -p /usr/lib/trino-gateway /etc/gateway && \
chown -R "trino:trino" /usr/lib/trino-gateway /etc/gateway

COPY --chown=trino:trino gateway-ha /usr/lib/trino-gateway

EXPOSE 8080
USER trino:trino
CMD java -jar /usr/lib/trino-gateway/gateway-ha-jar-with-dependencies.jar "/opt/trino-gateway/config.yaml"
CMD java -jar /usr/lib/trino-gateway/gateway-ha-jar-with-dependencies.jar "/etc/gateway/config.yaml"

HEALTHCHECK --interval=10s --timeout=5s --start-period=10s \
CMD /usr/lib/trino-gateway/bin/health-check
2 changes: 1 addition & 1 deletion docker/bin/health-check
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function get_property() {
grep "$1" "$2" | cut -d':' -f2 | tr -d '[:space:]' || true
}

config=/opt/trino-gateway/config.yaml
config=/etc/gateway/config.yaml
scheme=http
port=8080

Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
ports:
- "8080:8080"
volumes:
- target: /opt/trino-gateway/config.yaml
- target: /etc/gateway/config.yaml
source: ./config.yaml
type: bind

Expand Down
2 changes: 1 addition & 1 deletion docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ details found in the `docker-compose.yml` file.
## Configuration

The image uses the configuration file `docker/config.yaml` from the project
checkout, and mounts it at `/opt/trino-gateway/config.yaml`.
checkout, and mounts it at `/etc/gateway/config.yaml`.

## Health check

Expand Down
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ configuration.
By default, the Trino Gateway process is started with the following command:

```shell
java -XX:MinRAMPercentage=80.0 -XX:MaxRAMPercentage=80.0 -jar /usr/lib/trino/gateway-ha-jar-with-dependencies.jar config.yaml
java -XX:MinRAMPercentage=80.0 -XX:MaxRAMPercentage=80.0 -jar /usr/lib/trino-gateway/gateway-ha-jar-with-dependencies.jar /etc/gateway/config.yaml
```

You can customize details with the `command` node. It accepts a list, that must
Expand Down

0 comments on commit 854dbec

Please sign in to comment.