Skip to content

Commit

Permalink
Fixing directory creation and downstream issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dubo-dubon-duponey committed Mar 19, 2024
1 parent e7119aa commit 7d736e0
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions Dockerfile.runtime
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,14 @@ RUN echo "umask 0700" > /etc/profile.d/dbdbdp; \
RUN adduser --system --no-create-home --home /nonexistent --gecos "in dockerfile user" \
--uid 2000 \
dubo-dubon-duponey; \
mkdir -p /boot; \
mkdir -p /config; \
mkdir -p /data; \
mkdir -p /certs; \
chown -R 2000:root /boot; \
chown -R 2000:root /config; \
chown -R 2000:root /data; \
chown -R 2000:root /certs; \
epoch="$(date --date "$BUILD_CREATED" +%s)"; \
touch --no-dereference --date="@$epoch" /boot; \
touch --no-dereference --date="@$epoch" /config; \
touch --no-dereference --date="@$epoch" /data; \
touch --no-dereference --date="@$epoch" /certs;
for i in /boot /certs \
"$XDG_DATA_HOME" "$XDG_CONFIG_HOME" "$XDG_STATE_HOME" "$XDG_CACHE_HOME" \
"$XDG_RUNTIME_DIR" "$XDG_DATA_DIRS" "$XDG_CONFIG_DIRS"; do
mkdir -p "$i"; \
chown -R 2000:root "$i"; \
touch --no-dereference --date="@$epoch" "$i"; \
done

# Fix timestamp on files altered by user creation and ca-certificates to fix reproducibility
# NOTE: this is somewhat problematic. BUILD_CREATED could be older than the Debian image it is using.
Expand Down

0 comments on commit 7d736e0

Please sign in to comment.