Skip to content

Commit

Permalink
install right architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg committed Dec 19, 2024
1 parent c36438e commit 60a333e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions services/agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
# Define arguments in the global scope
ARG PYTHON_VERSION="3.11.9"
ARG UV_VERSION="0.4"

FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv_build
# we docker image is built based on debian
FROM python:${PYTHON_VERSION}-slim-bookworm AS base


#
# USAGE:
# cd sercices/agent
Expand Down Expand Up @@ -57,6 +59,8 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
ENV PATH="${VIRTUAL_ENV}/bin:$PATH"

# rclone installation
ARG TARGETARCH
ENV TARGETARCH=${TARGETARCH}
RUN \
--mount=type=bind,source=scripts/install_rclone.bash,target=/tmp/install_rclone.bash \
./tmp/install_rclone.bash
Expand Down
9 changes: 8 additions & 1 deletion services/dynamic-sidecar/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,19 @@ RUN \
&& gosu nobody true

# install RClone, we do it in a separate layer such that the cache is not locked forever, as this seems to take a long time
ARG TARGETARCH
ENV TARGETARCH=${TARGETARCH}
RUN \
--mount=type=bind,source=scripts/install_rclone.bash,target=install_rclone.bash \
./install_rclone.bash

RUN AWS_CLI_VERSION="2.11.11" \
&& curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${AWS_CLI_VERSION}.zip" -o "awscliv2.zip" \
&& case "${TARGETARCH}" in \
"amd64") ARCH="x86_64" ;; \
"arm64") ARCH="aarch64" ;; \
*) echo "Unsupported architecture: ${TARGETARCH}" && exit 1 ;; \
esac \
&& curl "https://awscli.amazonaws.com/awscli-exe-linux-${ARCH}-${AWS_CLI_VERSION}.zip" -o "awscliv2.zip" \
&& apt-get update && apt-get install -y unzip \
&& unzip awscliv2.zip \
&& ./aws/install \
Expand Down

0 comments on commit 60a333e

Please sign in to comment.