-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathDockerfile.test-pgch
More file actions
35 lines (29 loc) · 1.25 KB
/
Dockerfile.test-pgch
File metadata and controls
35 lines (29 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# ==============================================================================
# Traceway pgch Test Image
# Runs ClickHouse + PostgreSQL + Go tests in a single container
# ==============================================================================
FROM golang:1.25-bookworm
# Install PostgreSQL + ClickHouse
RUN apt-get update && apt-get install -y --no-install-recommends \
postgresql \
postgresql-client \
sudo \
ca-certificates \
curl \
gnupg \
&& rm -rf /var/lib/apt/lists/*
# Install ClickHouse
RUN curl -fsSL https://packages.clickhouse.com/rpm/lts/repodata/repomd.xml.key | gpg --dearmor -o /usr/share/keyrings/clickhouse-keyring.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/clickhouse-keyring.gpg] https://packages.clickhouse.com/deb stable main" > /etc/apt/sources.list.d/clickhouse.list \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends clickhouse-server clickhouse-client \
&& rm -rf /var/lib/apt/lists/*
# Copy backend source
WORKDIR /app/backend
COPY backend/go.mod backend/go.sum ./
RUN go mod download
COPY backend/ ./
# Copy the entrypoint
COPY scripts/test-pgch-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]