Skip to content

Commit 74683bd

Browse files
[sandbox/rest_gateway] Fix Docker build compatibility for ARM64 and health checks (#2110)
**Link the Issue(s) this Pull Request is related to.** - #2111 **Summarize your change.** [sandbox/rest_gateway] Fix Docker build compatibility for ARM64 and health checks - Switch REST Gateway base image from Rocky Linux 9 to golang:1.24-bookworm (fixes DNF module YAML parsing errors on ARM64) - Use debian:bookworm-slim for REST Gateway runtime image - Add curl to REST Gateway image for health checks - Fix CueWeb health check to use wget (Alpine doesn't have curl)
1 parent 9737ec5 commit 74683bd

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

rest_gateway/Dockerfile

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
FROM rockylinux:9 AS build
1+
FROM golang:1.24-bookworm AS build
22

3-
# Install Go 1.21 and dependencies
4-
RUN dnf install -y epel-release && \
5-
dnf --enablerepo=crb install -y wget git protobuf protobuf-devel protobuf-compiler && \
6-
wget https://go.dev/dl/go1.21.13.linux-amd64.tar.gz && \
7-
tar -C /usr/local -xzf go1.21.13.linux-amd64.tar.gz && \
8-
rm go1.21.13.linux-amd64.tar.gz && \
9-
dnf clean all
3+
# Install protobuf compiler
4+
RUN apt-get update && \
5+
apt-get install -y protobuf-compiler && \
6+
rm -rf /var/lib/apt/lists/*
107

118
WORKDIR /app
12-
ENV PATH=$PATH:/usr/local/go/bin:/root/go/bin
9+
ENV PATH=$PATH:/root/go/bin
1310

1411
# Copy all of the staged files (protos plus go source)
1512
COPY ./proto /app/proto
@@ -48,15 +45,19 @@ RUN protoc -I ../proto/src/ --grpc-gateway_out ./gen/go \
4845
# Build project
4946
RUN go build -o grpc_gateway main.go
5047

51-
FROM rockylinux:9-minimal
48+
FROM debian:bookworm-slim
49+
50+
# Install curl for health checks
51+
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates && rm -rf /var/lib/apt/lists/*
52+
5253
COPY --from=build /app/opencue_gateway/grpc_gateway /app/
5354

5455
# Ensure logs folder is created and has correct permissions
5556
RUN mkdir -p /logs && chmod 755 /logs
5657

5758
# Set default environment variables
5859
ENV CUEBOT_ENDPOINT=localhost:8443
59-
ENV REST_PORT=8448
60+
ENV REST_PORT=8448
6061
ENV JWT_SECRET=default-secret-key
6162

6263
EXPOSE 8448

sandbox/docker-compose.full.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ services:
181181
condition: service_healthy
182182
restart: unless-stopped
183183
healthcheck:
184-
test: ["CMD", "curl", "-f", "http://localhost:3000"]
184+
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000"]
185185
interval: 30s
186186
timeout: 10s
187187
retries: 3

0 commit comments

Comments
 (0)