Skip to content

Commit 53f9992

Browse files
committed
Pre-install all TiDB versions in Docker image
- Install all TiDB versions (6.1.7, 6.5.12, 7.1.6, 7.5.7, 8.1.2, 8.5.3) during image build - Also pre-install PD and TiKV components for each version - This avoids downloading components during test runs, making tests faster - Versions match .github/workflows/main.yml env.TIDB_VERSIONS
1 parent 9fe12af commit 53f9992

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Dockerfile.tiup-playground

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Dockerfile for TiUP Playground container
22
# This image contains TiUP and can run TiDB Playground inside a container
3+
# Pre-installs all TiDB versions used in tests to avoid downloads during test runs
34

45
FROM ubuntu:22.04
56

@@ -21,6 +22,31 @@ ENV PATH="/root/.tiup/bin:${PATH}"
2122
RUN /root/.tiup/bin/tiup update --self && \
2223
/root/.tiup/bin/tiup update playground || true
2324

25+
# Pre-install all TiDB versions used in tests
26+
# This avoids downloading components during test runs, making tests faster
27+
# Versions must match .github/workflows/main.yml env.TIDB_VERSIONS
28+
RUN /root/.tiup/bin/tiup install tidb:v6.1.7 && \
29+
/root/.tiup/bin/tiup install tidb:v6.5.12 && \
30+
/root/.tiup/bin/tiup install tidb:v7.1.6 && \
31+
/root/.tiup/bin/tiup install tidb:v7.5.7 && \
32+
/root/.tiup/bin/tiup install tidb:v8.1.2 && \
33+
/root/.tiup/bin/tiup install tidb:v8.5.3 || true
34+
35+
# Also pre-install PD and TiKV components for these versions (needed by playground)
36+
# Note: TiUP playground will download these if not present, but pre-installing speeds things up
37+
RUN /root/.tiup/bin/tiup install pd:v6.1.7 && \
38+
/root/.tiup/bin/tiup install tikv:v6.1.7 && \
39+
/root/.tiup/bin/tiup install pd:v6.5.12 && \
40+
/root/.tiup/bin/tiup install tikv:v6.5.12 && \
41+
/root/.tiup/bin/tiup install pd:v7.1.6 && \
42+
/root/.tiup/bin/tiup install tikv:v7.1.6 && \
43+
/root/.tiup/bin/tiup install pd:v7.5.7 && \
44+
/root/.tiup/bin/tiup install tikv:v7.5.7 && \
45+
/root/.tiup/bin/tiup install pd:v8.1.2 && \
46+
/root/.tiup/bin/tiup install tikv:v8.1.2 && \
47+
/root/.tiup/bin/tiup install pd:v8.5.3 && \
48+
/root/.tiup/bin/tiup install tikv:v8.5.3 || true
49+
2450
# Default command runs TiUP Playground
2551
# This will be overridden by testcontainers with specific version and port
2652
CMD ["/root/.tiup/bin/tiup", "playground"]

0 commit comments

Comments
 (0)