Skip to content

Commit

Permalink
Build: [AEA-4069] - Deployment Process Improvement (#8)
Browse files Browse the repository at this point in the history
## Summary

🎫 [AEA-4069](https://nhsd-jira.digital.nhs.uk/browse/AEA-4069) Create
NPPTS CloudWatch Dashboard

- Routine Change
- 🤖 Operational or Infrastructure Change

### Details

Deployment Process Improvement
  • Loading branch information
kris-szlapa authored Oct 8, 2024
1 parent a797cb6 commit 01d2a96
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
FROM ubuntu:24.04

RUN apt-get update \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y upgrade

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends jq unzip wget ca-certificates make git curl
&& apt-get -y upgrade \
&& apt-get -y install --no-install-recommends htop vim curl git build-essential \
libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg8-dev libbz2-dev \
zlib1g-dev unixodbc unixodbc-dev libsecret-1-0 libsecret-1-dev libsqlite3-dev \
jq apt-transport-https ca-certificates gnupg-agent \
software-properties-common bash-completion python3-pip make libbz2-dev \
libreadline-dev libsqlite3-dev wget llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev liblzma-dev libyaml-dev bats bats-support bats-assert bats-file \
python3 python3-pip python3-dev unzip

# Install AWS stuff
RUN wget -O /tmp/awscliv2.zip "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" && \
Expand All @@ -27,14 +33,24 @@ RUN git clone https://github.com/asdf-vm/asdf.git /home/cdkuser/.asdf --branch v
ENV PATH="$PATH:/home/cdkuser/.asdf/bin/:/home/cdkuser/node_modules/.bin"

# Install ASDF plugins
RUN asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
RUN asdf plugin add shellcheck https://github.com/luizm/asdf-shellcheck.git; \
asdf plugin add actionlint; \
asdf plugin add python; \
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git; \
asdf plugin add poetry https://github.com/asdf-community/asdf-poetry.git; \
asdf plugin add direnv; \
asdf plugin add actionlint; \
asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git

# Remove ruby, python, poetry from asdf install
# Copy local asdf folder to make the build faster
COPY --chown=cdkuser .asdf /home/cdkuser/.asdf
COPY --chown=cdkuser .tool-versions /home/cdkuser/.tool-versions
RUN sed -i -n '/nodejs/p' /home/cdkuser/.tool-versions

RUN asdf install; \
asdf reshim nodejs
asdf reshim python; \
asdf reshim poetry; \
asdf reshim nodejs; \
asdf direnv setup --shell bash --version 2.32.2;

# Copy files needed for deployment
COPY --chown=cdkuser packages /home/cdkuser/packages
Expand Down

0 comments on commit 01d2a96

Please sign in to comment.