Skip to content

Commit e0493ae

Browse files
committed
Improve path and file names in Docker image
1 parent c27e890 commit e0493ae

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

docker/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN \
2727
curl -#LfS "${JDK_DOWNLOAD_LINK}" | tar -zx --strip 1 -C "${JAVA_HOME}"
2828

2929
FROM ${TRINO_GATEWAY_BASE_IMAGE}
30-
WORKDIR /opt/trino
30+
WORKDIR /opt/trino-gateway
3131

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

46-
COPY --chown=trino:trino gateway-ha /usr/lib/trino
46+
COPY --chown=trino:trino gateway-ha /usr/lib/trino-gateway
4747

4848
EXPOSE 8080
4949
USER trino:trino
50-
CMD java -jar /usr/lib/trino/gateway-ha-jar-with-dependencies.jar "/opt/trino/gateway-ha-config.yml"
50+
CMD java -jar /usr/lib/trino-gateway/gateway-ha-jar-with-dependencies.jar "/opt/trino-gateway/config.yaml"
5151

5252
HEALTHCHECK --interval=10s --timeout=5s --start-period=10s \
53-
CMD /usr/lib/trino/bin/health-check
53+
CMD /usr/lib/trino-gateway/bin/health-check

docker/bin/health-check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function get_property() {
66
grep "$1" "$2" | cut -d':' -f2 | tr -d '[:space:]' || true
77
}
88

9-
config=/opt/trino/gateway-ha-config.yml
9+
config=/opt/trino-gateway/config.yaml
1010
scheme=http
1111
port=8080
1212

File renamed without changes.

docker/docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ services:
55
postgres:
66
condition: service_healthy
77
healthcheck:
8-
test: ["CMD-SHELL", "/usr/lib/trino/bin/health-check || exit 1"]
8+
test: ["CMD-SHELL", "/usr/lib/trino-gateway/bin/health-check || exit 1"]
99
interval: 5s
1010
timeout: 5s
1111
retries: 60
1212
start_period: 20s
1313
ports:
1414
- "8080:8080"
1515
volumes:
16-
- target: /opt/trino/gateway-ha-config.yml
17-
source: ../gateway-ha/gateway-ha-config-docker.yml
16+
- target: /opt/trino-gateway/config.yaml
17+
source: ./config.yaml
1818
type: bind
1919

2020
postgres:

docs/docker.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ details found in the `docker-compose.yml` file.
151151

152152
## Configuration
153153

154-
The image uses the configuration file `gateway-ha/gateway-ha-config-docker.yml`
155-
from the project checkout, and mounts it at `/opt/trino/gateway-ha-config.yml`.
154+
The image uses the configuration file `docker/config.yaml` from the project
155+
checkout, and mounts it at `/opt/trino-gateway/config.yaml`.
156156

157157
## Health check
158158

159159
By default the container health check uses the file `docker/bin/health-check`
160-
mounted at `/usr/lib/trino/bin/health-check`. The scripts expects a 2XX response
161-
from the server at `/api/public/backends`.
160+
mounted at `/usr/lib/trino-gateway/bin/health-check`. The scripts expects a 2XX
161+
response from the server at `/api/public/backends`.

0 commit comments

Comments
 (0)