diff --git a/docker/Dockerfile b/docker/Dockerfile index fabda89..9e70cfa 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -21,9 +21,12 @@ RUN mkdir -p /downloads && cd /downloads && \ curl -LJO https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-9.1.0-linux-glibc2.28-arm-64bit.tar.gz && \ tar -zxf mysql-shell-9.1.0-linux-glibc2.28-arm-64bit.tar.gz && \ mv mysql-shell-9.1.0-linux-glibc2.28-arm-64bit mysqlsh && \ + touch mysql-shell.deb && \ ARCH="aarch64"; \ else \ curl -LJO https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell_9.1.0-1debian12_amd64.deb && \ + mv mysql-shell_9.1.0-1debian12_amd64.deb mysql-shell.deb && \ + mkdir mysqlsh && \ ARCH="amd64"; \ fi && \ curl -LJO https://github.com/duckdb/duckdb/releases/download/v1.1.3/duckdb_cli-linux-$ARCH.zip && \ @@ -54,9 +57,7 @@ ARG TARGETARCH RUN apt-get update && apt-get install -y debian-archive-keyring \ && apt-get update && apt-get install -y \ - procps \ libssh-4 \ - libstdc++6 \ python3 python3-pip \ postgresql-client \ --no-install-recommends \ @@ -66,15 +67,17 @@ RUN apt-get update && apt-get install -y debian-archive-keyring \ # Install MySQL Shell from builder stage COPY --from=builder /downloads/duckdb /usr/local/bin/ COPY --from=builder /downloads/mysqlsh /usr/local/mysqlsh.arm64 -COPY --from=builder /downloads/mysql-shell_9.1.0-1debian12_amd64.deb /tmp/mysql-shell.deb +COPY --from=builder /downloads/mysql-shell.deb /tmp/ RUN if [ "$TARGETARCH" = "arm64" ]; then \ mv /usr/local/mysqlsh.arm64 /usr/local/mysqlsh && \ - ln -s /usr/local/mysqlsh/bin/mysqlsh /usr/local/bin/mysqlsh; \ + ln -s /usr/local/mysqlsh/bin/mysqlsh /usr/local/bin/mysqlsh && \ + rm -f /tmp/mysql-shell.deb; \ else \ apt-get update && \ apt-get install -y /tmp/mysql-shell.deb && \ rm /tmp/mysql-shell.deb && \ + rm -rf /usr/local/mysqlsh.arm64 && \ rm -rf /var/lib/apt/lists/*; \ fi && \ rm -f /usr/local/mysqlsh.arm64