forked from aiidateam/aiida-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
25 lines (18 loc) · 896 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
FROM aiidateam/aiida-prerequisites:0.4.0
# to run the tests
RUN pip install ansible~=2.10.0 molecule~=3.1.0
RUN apt-get update && \
apt-get install -y sudo && \
apt-get autoclean
ARG uid=1000
ARG gid=1000
# add USER (no password); 1000 is the uid of the user in the jenkins docker
RUN groupadd -g ${gid} jenkins && useradd -m -s /bin/bash -u ${uid} -g ${gid} jenkins
# add to sudoers and don't ask password
RUN adduser jenkins sudo && adduser jenkins adm && adduser jenkins root
RUN echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/nopwd
RUN mkdir -p /scratch/jenkins/ && chown jenkins /scratch/jenkins/ && chmod o+rX /scratch/
# set $HOME to the directory where the repository is mounted
ENV HOME /home/jenkins
# this is added since otherwise jenkins prints /etc/profile contents for all sh commands
RUN echo 'set +x' | cat - /etc/profile > temp && mv temp /etc/profile