-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (35 loc) · 1.44 KB
/
Dockerfile
File metadata and controls
45 lines (35 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM ubuntu:24.04
ARG VERSION
RUN apt-get update \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y upgrade
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends ca-certificates curl git jq make unzip wget \
&& apt-get clean
# install aws stuff
ADD https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip /tmp/awscliv2.zip
RUN unzip /tmp/awscliv2.zip -d /tmp/aws-cli && \
/tmp/aws-cli/aws/install && \
rm tmp/awscliv2.zip && \
rm -rf /tmp/aws-cli
RUN useradd -ms /bin/bash cdkuser
RUN chown -R cdkuser /home/cdkuser
WORKDIR /home/cdkuser
USER cdkuser
# Install ASDF
RUN git clone https://github.com/asdf-vm/asdf.git /home/cdkuser/.asdf --branch v0.14.1; \
echo '. /home/cdkuser/.asdf/asdf.sh' >> ~/.bashrc; \
echo '. /home/cdkuser/.asdf/completions/asdf.bash' >> ~/.bashrc; \
echo 'PATH="$PATH:/home/cdkuser/.asdf/bin/"' >> ~/.bashrc;
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
# install some common node versions that are used in builds to speed things up
RUN asdf install nodejs 20.19.1
RUN asdf install nodejs 23.9.0
RUN asdf install nodejs 20.19.0
RUN asdf install nodejs 22.12.0
# copy files needed for deployment
COPY --chown=cdkuser docker/entrypoint.sh /home/cdkuser/
RUN echo "${VERSION}" > version.txt
ENTRYPOINT ["/home/cdkuser/entrypoint.sh"]