-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
34 lines (27 loc) · 850 Bytes
/
Dockerfile
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
# Copyright (c) CloudBees, Inc.
FROM alpine:3.19.0
ENV ASDF_VERSION=v0.11.3 \
USER=bp-agent \
DOCKERFILE_PATH=blueprints
RUN apk add --virtual .asdf-deps --no-cache bash \
curl \
git \
make \
aws-cli
SHELL ["/bin/bash", "-l", "-c"]
RUN adduser -s /bin/bash -h /${USER} -D ${USER}
WORKDIR /${USER}
USER ${USER}
COPY ${DOCKERFILE_PATH}/.tool-versions .tool-versions
RUN echo "source .bash_profile" >> .bashrc && \
cat <<EOF >> .bash_profile
PATH=/${USER}/.asdf/shims:/home/$USER/.asdf/bin:${PATH}
source /${USER}/.asdf/asdf.sh
rm -rf .asdf/shims/* && asdf reshim
export PS1="\u \W:\$ "
EOF
RUN git clone --depth 1 https://github.com/asdf-vm/asdf.git --branch ${ASDF_VERSION} .asdf && \
source .asdf/asdf.sh && \
cut -d' ' -f1 .tool-versions|xargs -i asdf plugin add {} && \
asdf install
CMD ["/bin/bash"]