forked from tracewayapp/traceway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.test-pgch
More file actions
37 lines (31 loc) · 1.3 KB
/
Copy pathDockerfile.test-pgch
File metadata and controls
37 lines (31 loc) · 1.3 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
36
37
# ==============================================================================
# Traceway pgch Test Image
# Runs ClickHouse + PostgreSQL + Go tests in a single container
# ==============================================================================
FROM golang:1.26-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 ./
COPY cli/go.mod cli/go.sum /app/cli/
RUN go mod download
COPY backend/ ./
COPY cli/ /app/cli/
# Copy the entrypoint
COPY scripts/test-pgch-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]