@@ -15,50 +15,63 @@ RUN mkdir -p /tmp && chmod 1777 /tmp
1515
1616# Install system dependencies
1717RUN apt-get update \
18- && export DEBIAN_FRONTEND=noninteractive \
19- && apt-get -y dist-upgrade \
20- && apt-get -y install --no-install-recommends htop vim curl git build-essential \
21- libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg8-dev libbz2-dev \
22- zlib1g-dev unixodbc unixodbc-dev libsecret-1-0 libsecret-1-dev libsqlite3-dev \
23- openjdk-8-jdk jq apt-transport-https ca-certificates gnupg-agent \
24- software-properties-common bash-completion python3-pip make \
25- libreadline-dev libsqlite3-dev wget llvm libncurses5-dev libncursesw5-dev \
26- xz-utils tk-dev liblzma-dev netcat-traditional libyaml-dev
18+ && export DEBIAN_FRONTEND=noninteractive \
19+ && apt-get -y dist-upgrade \
20+ && apt-get -y install --no-install-recommends htop vim curl git build-essential \
21+ libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg8-dev libbz2-dev \
22+ zlib1g-dev unixodbc unixodbc-dev libsecret-1-0 libsecret-1-dev libsqlite3-dev \
23+ openjdk-8-jdk jq apt-transport-https ca-certificates gnupg-agent \
24+ software-properties-common bash-completion python3-pip make \
25+ libreadline-dev libsqlite3-dev wget llvm libncurses5-dev libncursesw5-dev \
26+ xz-utils tk-dev liblzma-dev netcat-traditional libyaml-dev
27+
28+ # Install ASDF
29+ RUN ASDF_VERSION=$(awk '!/^#/ && NF {print $1; exit}' /tmp/.tool-versions.asdf) && \
30+ if [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" == "aarch64" ]; then \
31+ 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" ; \
32+ else \
33+ 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" ; \
34+ fi && \
35+ tar -xzf /tmp/asdf.tar.gz -C /tmp && \
36+ mkdir -p /usr/bin && \
37+ mv /tmp/asdf /usr/bin/asdf && \
38+ chmod +x /usr/bin/asdf && \
39+ rm -rf /tmp/asdf.tar.gz
2740
2841# specify DOCKER_GID to force container docker group id to match host
2942RUN if [ -n "${DOCKER_GID}" ]; then \
30- if ! getent group docker; then \
31- groupadd -g ${DOCKER_GID} docker; \
32- else \
33- groupmod -g ${DOCKER_GID} docker; \
34- fi && \
35- usermod -aG docker vscode; \
36- fi
43+ if ! getent group docker; then \
44+ groupadd -g ${DOCKER_GID} docker; \
45+ else \
46+ groupmod -g ${DOCKER_GID} docker; \
47+ fi && \
48+ usermod -aG docker vscode; \
49+ fi
3750
3851USER vscode
3952
4053ENV PATH="/home/vscode/.asdf/shims/:$PATH"
4154RUN \
42- echo 'PATH="/home/vscode/.asdf/shims/:$PATH"' >> ~/.bashrc; \
43- echo '. <(asdf completion bash)' >> ~/.bashrc;
55+ echo 'PATH="/home/vscode/.asdf/shims/:$PATH"' >> ~/.bashrc; \
56+ echo '. <(asdf completion bash)' >> ~/.bashrc;
4457
4558ENV PATH="$PATH:/workspaces/electronic-prescription-service-api-regression-tests/node_modules/.bin"
4659
4760# Install ASDF plugins for regression testing tools
4861RUN asdf plugin add python && \
49- asdf plugin add poetry https://github.com/asdf-community/asdf-poetry.git && \
50- asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git && \
51- asdf plugin add shellcheck https://github.com/luizm/asdf-shellcheck.git && \
52- asdf plugin add actionlint && \
53- asdf plugin add allure
62+ asdf plugin add poetry https://github.com/asdf-community/asdf-poetry.git && \
63+ asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git && \
64+ asdf plugin add shellcheck https://github.com/luizm/asdf-shellcheck.git && \
65+ asdf plugin add actionlint && \
66+ asdf plugin add allure
5467
5568WORKDIR /workspaces/electronic-prescription-service-api-regression-tests
5669ADD .tool-versions /workspaces/electronic-prescription-service-api-regression-tests/.tool-versions
5770ADD .tool-versions /home/vscode/.tool-versions
5871
5972# install python before poetry to ensure correct python version is used
6073RUN asdf install python && \
61- asdf install && \
62- asdf reshim python && \
63- asdf reshim poetry && \
64- asdf reshim nodejs
74+ asdf install && \
75+ asdf reshim python && \
76+ asdf reshim poetry && \
77+ asdf reshim nodejs
0 commit comments