mirror of
https://github.com/stakater/Reloader.git
synced 2026-02-14 18:09:50 +00:00
Update docker UBI image
Signed-off-by: faizanahmad055 <faizan.ahmad55@outlook.com>
This commit is contained in:
@@ -20,7 +20,18 @@ RUN mkdir /image && \
|
||||
COPY ubi-build-files-${TARGETARCH}.txt /tmp
|
||||
# Copy all the required files from the base UBI image into the image directory
|
||||
# As the go binary is not statically compiled this includes everything needed for CGO to work, cacerts, tzdata and RH release files
|
||||
RUN tar cf /tmp/files.tar -T /tmp/ubi-build-files-${TARGETARCH}.txt && tar xf /tmp/files.tar -C /image/
|
||||
# Filter existing files before tarring to avoid "Cannot stat" errors on ARM64
|
||||
# Use -h flag to follow symlinks when creating the archive
|
||||
RUN while IFS= read -r file; do \
|
||||
[ -z "$file" ] && continue; \
|
||||
if [ -e "$file" ] || [ -L "$file" ]; then \
|
||||
echo "$file"; \
|
||||
fi; \
|
||||
done < /tmp/ubi-build-files-${TARGETARCH}.txt > /tmp/existing-files.txt && \
|
||||
if [ -s /tmp/existing-files.txt ]; then \
|
||||
tar -chf /tmp/files.tar -T /tmp/existing-files.txt && \
|
||||
tar xf /tmp/files.tar -C /image/; \
|
||||
fi
|
||||
|
||||
# Generate a rpm database which contains all the packages that you said were needed in ubi-build-files-*.txt
|
||||
RUN rpm --root /image --initdb \
|
||||
|
||||
Reference in New Issue
Block a user