Skip to content

Commit 70a20c7

Browse files
committed
Use alpine/git for git DL instead of ubuntu
1 parent acedb53 commit 70a20c7

File tree

3 files changed

+12
-90
lines changed

3 files changed

+12
-90
lines changed

debuntu/all/Dockerfile

+4-30
Original file line numberDiff line numberDiff line change
@@ -84,41 +84,15 @@ WORKDIR ${HOME}
8484

8585

8686

87-
FROM main AS test
87+
FROM alpine/git AS pdidl
8888

89+
RUN git -C /root clone --recurse-submodules https://github.com/pdidev/pdi.git /root/pdi
8990

90-
USER root:root
91-
WORKDIR /root
92-
ENV HOME=/root
9391

94-
RUN set -ex \
95-
&& export DEBIAN_FRONTEND=noninteractive \
96-
&& apt-get update -y \
97-
&& apt-get upgrade -y \
98-
&& apt-get install -y --no-install-recommends \
99-
ca-certificates \
100-
git
101-
102-
USER ci:ci
103-
WORKDIR /home/ci
104-
ENV HOME=/home/ci
10592

106-
RUN git clone --recurse-submodules https://github.com/pdidev/pdi.git
107-
108-
USER root:root
109-
WORKDIR /root
110-
ENV HOME=/root
111-
112-
RUN set -ex \
113-
&& export DEBIAN_FRONTEND=noninteractive \
114-
&& apt-get purge -y \
115-
ca-certificates \
116-
git
117-
118-
USER ci:ci
119-
WORKDIR /home/ci
120-
ENV HOME=/home/ci
93+
FROM main AS test
12194

95+
COPY --from=pdidl --chown=ci:ci /root/pdi /home/ci/pdi
12296

12397
RUN export VERBOSE=1 \
12498
&& bash pdi/bin/build_and_run_all_tests

debuntu/mini/Dockerfile

+4-30
Original file line numberDiff line numberDiff line change
@@ -73,41 +73,15 @@ WORKDIR ${HOME}
7373

7474

7575

76-
FROM main AS test
77-
76+
FROM alpine/git AS pdidl
7877

79-
USER root:root
80-
WORKDIR /root
81-
ENV HOME=/root
78+
RUN git -C /root clone --recurse-submodules https://github.com/pdidev/pdi.git /root/pdi
8279

83-
RUN set -ex \
84-
&& export DEBIAN_FRONTEND=noninteractive \
85-
&& apt-get update -y \
86-
&& apt-get upgrade -y \
87-
&& apt-get install -y --no-install-recommends \
88-
ca-certificates \
89-
git
9080

91-
USER ci:ci
92-
WORKDIR /home/ci
93-
ENV HOME=/home/ci
9481

95-
RUN git clone --recurse-submodules https://github.com/pdidev/pdi.git
96-
97-
USER root:root
98-
WORKDIR /root
99-
ENV HOME=/root
100-
101-
RUN set -ex \
102-
&& export DEBIAN_FRONTEND=noninteractive \
103-
&& apt-get purge -y \
104-
ca-certificates \
105-
git
106-
107-
USER ci:ci
108-
WORKDIR /home/ci
109-
ENV HOME=/home/ci
82+
FROM main AS test
11083

84+
COPY --from=pdidl --chown=ci:ci /root/pdi /home/ci/pdi
11185

11286
RUN export VERBOSE=1 \
11387
&& bash pdi/bin/build_and_run_all_tests

spack/7-finalize/Dockerfile

+4-30
Original file line numberDiff line numberDiff line change
@@ -147,41 +147,15 @@ ENV HOME=/home/ci
147147

148148

149149

150-
FROM main AS test
150+
FROM alpine/git AS pdidl
151151

152+
RUN git -C /root clone --recurse-submodules https://github.com/pdidev/pdi.git /root/pdi
152153

153-
USER root:root
154-
WORKDIR /root
155-
ENV HOME=/root
156154

157-
RUN set -ex \
158-
&& export DEBIAN_FRONTEND=noninteractive \
159-
&& apt-get update -y \
160-
&& apt-get upgrade -y \
161-
&& apt-get install -y --no-install-recommends \
162-
ca-certificates \
163-
git
164-
165-
USER ci:ci
166-
WORKDIR /home/ci
167-
ENV HOME=/home/ci
168155

169-
RUN git clone --recurse-submodules https://github.com/pdidev/pdi.git
170-
171-
USER root:root
172-
WORKDIR /root
173-
ENV HOME=/root
174-
175-
RUN set -ex \
176-
&& export DEBIAN_FRONTEND=noninteractive \
177-
&& apt-get purge -y \
178-
ca-certificates \
179-
git
180-
181-
USER ci:ci
182-
WORKDIR /home/ci
183-
ENV HOME=/home/ci
156+
FROM main AS test
184157

158+
COPY --from=pdidl --chown=ci:ci /root/pdi /home/ci/pdi
185159

186160
RUN export VERBOSE=1 \
187161
&& bash pdi/bin/build_and_run_all_tests

0 commit comments

Comments
 (0)