Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update config file path in Docker image #628

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/trino-gateway && \
chown -R "trino:trino" /usr/lib/trino-gateway /etc/trino-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/trino-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/trino-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/trino-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/trino-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/trino-gateway/config.yaml
```

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