@@ -109,6 +109,12 @@ ENV S6_OVERLAY_VERSION="3.2.1.0"
109
109
ENV S6_OVERLAY_ARCH="x86_64"
110
110
ENV BASHIO_VERSION="0.16.2"
111
111
112
+ # #
113
+ # ubuntu › environment
114
+ # #
115
+
116
+ ENV ROOTFS=/root-out
117
+
112
118
# #
113
119
# detect ubuntu version from distro
114
120
# #
@@ -170,14 +176,14 @@ RUN \
170
176
MULTIDIGEST=$(jq -r ".manifests[] | select(.platform.architecture == \" ${UBUNTU_ARCH}\" ) | .digest[7:]" < ${DIGEST}) && \
171
177
TARBALL=$(jq -r '.layers[0].digest[7:]' < ${MULTIDIGEST}); \
172
178
fi && \
173
- mkdir /root-out && \
179
+ mkdir $ROOTFS && \
174
180
tar xf \
175
181
${TARBALL} -C \
176
- /root-out && \
182
+ $ROOTFS && \
177
183
rm -rf \
178
- /root-out /var/log/* \
179
- /root-out /home/ubuntu \
180
- /root-out /root/{.ssh,.bashrc,.profile} \
184
+ $ROOTFS /var/log/* \
185
+ $ROOTFS /home/ubuntu \
186
+ $ROOTFS /root/{.ssh,.bashrc,.profile} \
181
187
/build
182
188
183
189
# #
@@ -212,13 +218,13 @@ RUN \
212
218
fi \
213
219
\
214
220
&& wget -P /tmp "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz" && \
215
- tar -C /root-out -Jxpf /tmp/s6-overlay-noarch.tar.xz && \
221
+ tar -C $ROOTFS -Jxpf /tmp/s6-overlay-noarch.tar.xz && \
216
222
wget -P /tmp "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_OVERLAY_ARCH}.tar.xz" && \
217
- tar -C /root-out -Jxpf /tmp/s6-overlay-${S6_OVERLAY_ARCH}.tar.xz && \
223
+ tar -C $ROOTFS -Jxpf /tmp/s6-overlay-${S6_OVERLAY_ARCH}.tar.xz && \
218
224
wget -P /tmp "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-arch.tar.xz" && \
219
- tar -C /root-out -Jxpf /tmp/s6-overlay-symlinks-arch.tar.xz && \
225
+ tar -C $ROOTFS -Jxpf /tmp/s6-overlay-symlinks-arch.tar.xz && \
220
226
wget -P /tmp "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz" && \
221
- tar -C /root-out -Jxpf /tmp/s6-overlay-symlinks-noarch.tar.xz && unlink /root-out /usr/bin/with-contenv
227
+ tar -C $ROOTFS -Jxpf /tmp/s6-overlay-symlinks-noarch.tar.xz && unlink $ROOTFS /usr/bin/with-contenv
222
228
223
229
# #
224
230
# install bashio
@@ -236,7 +242,7 @@ RUN \
236
242
# #
237
243
238
244
FROM scratch
239
- COPY --from=rootfs-stage /root-out / /
245
+ COPY --from=rootfs-stage $ROOTFS / /
240
246
241
247
# #
242
248
# scratch › args
0 commit comments