Skip to content

Commit 31b3e38

Browse files
authored
Update Dockerfile
1 parent 787be40 commit 31b3e38

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

Dockerfile

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,21 @@ RUN apt-get update && apt-get install -y \
2424

2525
RUN pip3 install mkdocs --break-system-packages
2626

27-
ENV HOME="/root"
27+
RUN ln -s "/home/jenkins/.pyenv/bin/pyenv" /usr/local/bin/pyenv
28+
29+
USER ${user}
30+
31+
ENV HOME="/home/jenkins"
2832
WORKDIR ${HOME}
2933

3034
SHELL ["/bin/bash", "-c"]
3135

3236
RUN git clone --depth=1 https://github.com/pyenv/pyenv.git .pyenv
3337

34-
RUN chown -R jenkins:jenkins "${HOME}/.pyenv"
35-
3638
ENV PYENV_ROOT="${HOME}/.pyenv"
3739
ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PATH}"
38-
39-
RUN ln -s "${PYENV_ROOT}/bin/pyenv" /usr/local/bin/pyenv
40-
RUN chown -R jenkins:jenkins "${PYENV_ROOT}"
41-
RUN chown -R jenkins:jenkins "/usr/local/bin/pyenv"
42-
4340
RUN eval "$(pyenv init -)"
4441

45-
USER ${user}
46-
4742
RUN pyenv version
4843

4944
ENTRYPOINT ["/usr/local/bin/jenkins-agent"]

0 commit comments

Comments
 (0)