33# This base image contains:
44# - Python 3.9 (minimum supported version)
55# - Tusk CLI (for running replay tests)
6- # - System utilities (curl, postgresql-client)
6+ # - System utilities (curl, postgresql-client, socat, bubblewrap )
77#
88# Build this image before running e2e tests:
99# docker build -t python-e2e-base:latest -f drift/instrumentation/e2e-common/Dockerfile.base .
@@ -12,38 +12,40 @@ FROM python:3.9-slim
1212
1313# Install system dependencies
1414RUN apt-get update && apt-get install -y --no-install-recommends \
15- curl \
16- postgresql-client \
17- && rm -rf /var/lib/apt/lists/*
15+ curl \
16+ postgresql-client \
17+ socat \
18+ bubblewrap \
19+ && rm -rf /var/lib/apt/lists/*
1820
1921# Install Tusk CLI
2022# The CLI is downloaded from GitHub releases (tar.gz archives)
2123ARG TUSK_CLI_VERSION=latest
2224RUN set -ex && \
23- if [ "$TUSK_CLI_VERSION" = "latest" ]; then \
24- # Get the latest version tag
25- VERSION=$(curl -s https://api.github.com/repos/Use-Tusk/tusk-drift-cli/releases/latest | grep '"tag_name"' | cut -d '"' -f 4); \
26- else \
27- VERSION="${TUSK_CLI_VERSION}"; \
28- fi && \
29- # Remove 'v' prefix if present for the filename
30- VERSION_NUM=$(echo "$VERSION" | sed 's/^v//') && \
31- # Detect architecture (x86_64 or arm64)
32- ARCH=$(uname -m) && \
33- case "$ARCH" in \
34- x86_64) ARCH_NAME="x86_64" ;; \
35- aarch64|arm64) ARCH_NAME="arm64" ;; \
36- *) echo "Unsupported architecture: $ARCH" && exit 1 ;; \
37- esac && \
38- # Construct download URL (archives are named like tusk-drift-cli_0.1.35_Linux_x86_64.tar.gz)
39- DOWNLOAD_URL="https://github.com/Use-Tusk/tusk-drift-cli/releases/download/${VERSION}/tusk-drift-cli_${VERSION_NUM}_Linux_${ARCH_NAME}.tar.gz" && \
40- echo "Downloading Tusk CLI from: $DOWNLOAD_URL" && \
41- curl -fsSL "$DOWNLOAD_URL" -o /tmp/tusk.tar.gz && \
42- tar -xzf /tmp/tusk.tar.gz -C /tmp && \
43- mv /tmp/tusk /usr/local/bin/tusk && \
44- chmod +x /usr/local/bin/tusk && \
45- rm -rf /tmp/tusk.tar.gz /tmp/LICENSE /tmp/README.md && \
46- tusk --version
25+ if [ "$TUSK_CLI_VERSION" = "latest" ]; then \
26+ # Get the latest version tag
27+ VERSION=$(curl -s https://api.github.com/repos/Use-Tusk/tusk-drift-cli/releases/latest | grep '"tag_name"' | cut -d '"' -f 4); \
28+ else \
29+ VERSION="${TUSK_CLI_VERSION}"; \
30+ fi && \
31+ # Remove 'v' prefix if present for the filename
32+ VERSION_NUM=$(echo "$VERSION" | sed 's/^v//') && \
33+ # Detect architecture (x86_64 or arm64)
34+ ARCH=$(uname -m) && \
35+ case "$ARCH" in \
36+ x86_64) ARCH_NAME="x86_64" ;; \
37+ aarch64|arm64) ARCH_NAME="arm64" ;; \
38+ *) echo "Unsupported architecture: $ARCH" && exit 1 ;; \
39+ esac && \
40+ # Construct download URL (archives are named like tusk-drift-cli_0.1.35_Linux_x86_64.tar.gz)
41+ DOWNLOAD_URL="https://github.com/Use-Tusk/tusk-drift-cli/releases/download/${VERSION}/tusk-drift-cli_${VERSION_NUM}_Linux_${ARCH_NAME}.tar.gz" && \
42+ echo "Downloading Tusk CLI from: $DOWNLOAD_URL" && \
43+ curl -fsSL "$DOWNLOAD_URL" -o /tmp/tusk.tar.gz && \
44+ tar -xzf /tmp/tusk.tar.gz -C /tmp && \
45+ mv /tmp/tusk /usr/local/bin/tusk && \
46+ chmod +x /usr/local/bin/tusk && \
47+ rm -rf /tmp/tusk.tar.gz /tmp/LICENSE /tmp/README.md && \
48+ tusk --version
4749
4850# Upgrade pip
4951RUN pip install --upgrade pip
0 commit comments