Skip to content

Commit d52298e

Browse files
authored
Fix: [AEA-0000] - update dockerfile (#349)
## Summary - Routine Change ### Details - update Dockerfile
1 parent 6f660b7 commit d52298e

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

.devcontainer/Dockerfile

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ARG ASDF_VERSION
77
COPY .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

1212
RUN 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
4545
RUN 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+
5055
USER vscode
5156

5257
ENV 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

7075
WORKDIR /workspaces/validation-service-fhir-r4
7176
ADD .tool-versions /workspaces/validation-service-fhir-r4/.tool-versions
7277
ADD .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

Comments
 (0)