Skip to content

Commit

Permalink
ci: fix Dockfile (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
fanyang01 authored Dec 5, 2024
1 parent 4dabd74 commit d6f253d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down Expand Up @@ -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 \
Expand All @@ -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
Expand Down

0 comments on commit d6f253d

Please sign in to comment.