File tree 1 file changed +20
-12
lines changed
1 file changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,19 @@ ENV PYTHONUNBUFFERED=1 \
6
6
LC_ALL="C.UTF-8" \
7
7
LC_CTYPE="C.UTF-8"
8
8
9
+ # Create app directory
10
+ RUN set -eux; \
11
+ mkdir /app
12
+ WORKDIR /app
13
+
14
+ # Create user for ssh
15
+ RUN <<EOF
16
+ set -eux
17
+ useradd -m ansible
18
+ mkdir -p /home/ansible/.ssh
19
+ chown -R ansible:ansible /home/ansible/.ssh
20
+ EOF
21
+
9
22
# Install runtime dependencies
10
23
RUN <<EOF
11
24
set -eux
@@ -14,21 +27,16 @@ RUN <<EOF
14
27
rm -rf /var/lib/apt/lists/*
15
28
EOF
16
29
17
- # Install ansible dependencies
30
+ # Install python dependencies
18
31
COPY overlay/ /
19
32
RUN <<EOF
20
33
set -eux
21
34
pip install -r /opt/buildpack/requirements.txt
22
- ansible-galaxy collection install -r /opt/buildpack/requirements.yaml
23
35
EOF
24
36
25
- # Create app directory
26
- RUN set -eux; \
27
- mkdir /app
28
- WORKDIR /app
29
-
30
- # Create user for ssh
31
- RUN useradd -m ansible
32
- RUN mkdir -p /home/ansible/.ssh
33
- RUN chown -R ansible:ansible /home/ansible/.ssh
34
- USER ansible
37
+ # Install ansible dependencies
38
+ USER ansible
39
+ RUN <<EOF
40
+ set -eux
41
+ ansible-galaxy collection install -r /opt/buildpack/requirements.yaml
42
+ EOF
You can’t perform that action at this time.
0 commit comments