@@ -7,7 +7,7 @@ ARG ASDF_VERSION
77COPY .tool-versions.asdf /tmp/.tool-versions.asdf
88
99# Add amd64 architecture if on arm64
10- RUN if [ "$TARGETARCH" == "arm64" ] || [ "$TARGETARCH" = = "aarch64" ]; then dpkg --add-architecture amd64; fi
10+ RUN if [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" = "aarch64" ]; then dpkg --add-architecture amd64; fi
1111
1212RUN apt-get update \
1313 && export DEBIAN_FRONTEND=noninteractive \
@@ -22,7 +22,7 @@ RUN apt-get update \
2222 && apt remove -y openjdk-8-jdk-headless openjdk-8-jre-headless openjdk-8-jre
2323
2424# Download correct AWS CLI for arch
25- RUN if [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" == "aarch64" ]; then \
25+ RUN if [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" = "aarch64" ]; then \
2626 wget -O /tmp/awscliv2.zip "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" ; \
2727 else \
2828 wget -O /tmp/awscliv2.zip "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" ; \
@@ -32,7 +32,7 @@ RUN if [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" == "aarch64" ]; then \
3232 rm /tmp/awscliv2.zip && rm -rf /tmp/aws-cli
3333
3434# Download correct SAM CLI for arch
35- RUN if [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" == "aarch64" ]; then \
35+ RUN if [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" = "aarch64" ]; then \
3636 wget -O /tmp/aws-sam-cli.zip "https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-arm64.zip" ; \
3737 else \
3838 wget -O /tmp/aws-sam-cli.zip "https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip" ; \
@@ -43,10 +43,15 @@ RUN if [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" == "aarch64" ]; then \
4343
4444# Install ASDF
4545RUN ASDF_VERSION=$(awk '!/^#/ && NF {print $1; exit}' /tmp/.tool-versions.asdf) && \
46- wget -O /tmp/asdf.tar.gz https://github.com/asdf-vm/asdf/releases/download/v${ASDF_VERSION}/asdf-v${ASDF_VERSION}-linux-amd64.tar.gz; \
47- tar -xvzf /tmp/asdf.tar.gz; \
46+ if [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" = "aarch64" ]; then \
47+ wget -O /tmp/asdf.tar.gz https://github.com/asdf-vm/asdf/releases/download/v${ASDF_VERSION}/asdf-v${ASDF_VERSION}-linux-arm64.tar.gz; \
48+ else \
49+ wget -O /tmp/asdf.tar.gz https://github.com/asdf-vm/asdf/releases/download/v${ASDF_VERSION}/asdf-v${ASDF_VERSION}-linux-amd64.tar.gz; \
50+ fi && \
51+ tar -xvzf /tmp/asdf.tar.gz && \
4852 mv asdf /usr/bin
4953
54+
5055USER vscode
5156
5257ENV PATH="/home/vscode/.asdf/shims/:$PATH"
@@ -58,18 +63,18 @@ RUN \
5863 echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc;
5964
6065# Install ASDF plugins
61- RUN asdf plugin add python; \
62- asdf plugin add poetry https://github.com/asdf-community/asdf-poetry.git; \
63- asdf plugin add shellcheck https://github.com/luizm/asdf-shellcheck.git; \
64- asdf plugin- add java; \
65- asdf plugin- add maven; \
66- asdf plugin add direnv; \
67- asdf plugin add actionlint; \
66+ RUN asdf plugin add python && \
67+ asdf plugin add poetry https://github.com/asdf-community/asdf-poetry.git && \
68+ asdf plugin add shellcheck https://github.com/luizm/asdf-shellcheck.git && \
69+ asdf plugin add java && \
70+ asdf plugin add maven && \
71+ asdf plugin add direnv && \
72+ asdf plugin add actionlint && \
6873 asdf plugin add nodejs;
6974
7075WORKDIR /workspaces/validation-service-fhir-r4
7176ADD .tool-versions /workspaces/validation-service-fhir-r4/.tool-versions
7277ADD .tool-versions /home/vscode/.tool-versions
7378
74- RUN asdf install python; \
75- asdf intstall
79+ RUN asdf install python && \
80+ asdf install
0 commit comments