Compare commits

...

4 Commits

Author SHA1 Message Date
71c75671d5 Add debug code when sha match fails 2019-07-13 12:23:01 +02:00
5a66d1a8df Revert "Fix 0.17.56 sha"
This reverts commit a48b9d107d.
2019-07-13 12:22:21 +02:00
a48b9d107d Fix 0.17.56 sha 2019-07-13 12:05:08 +02:00
e5f34134f7 Apply shell-format 2019-07-13 12:04:34 +02:00
4 changed files with 56 additions and 54 deletions

View File

@ -5,16 +5,16 @@ LABEL maintainer="https://github.com/factoriotools/factorio-docker"
ENV VERSION=0.14.23 \ ENV VERSION=0.14.23 \
SHA1=6ef84341c6fc1cf45cfdd6acc8468aaa117b9e8a SHA1=6ef84341c6fc1cf45cfdd6acc8468aaa117b9e8a
RUN mkdir -p /opt && \ RUN mkdir -p /opt \
apk --no-cache add curl tini pwgen && \ && apk --no-cache add curl tini pwgen \
curl -sSL https://www.factorio.com/get-download/$VERSION/headless/linux64 \ && curl -sSL https://www.factorio.com/get-download/$VERSION/headless/linux64 \
-o /tmp/factorio_headless_x64_$VERSION.tar.gz && \ -o /tmp/factorio_headless_x64_$VERSION.tar.gz \
echo "$SHA1 /tmp/factorio_headless_x64_$VERSION.tar.gz" | sha1sum -c && \ && echo "$SHA1 /tmp/factorio_headless_x64_$VERSION.tar.gz" | sha1sum -c \
tar xzf /tmp/factorio_headless_x64_$VERSION.tar.gz --directory /opt && \ && tar xzf /tmp/factorio_headless_x64_$VERSION.tar.gz --directory /opt \
rm /tmp/factorio_headless_x64_$VERSION.tar.gz && \ && rm /tmp/factorio_headless_x64_$VERSION.tar.gz \
apk del curl && \ && apk del curl \
ln -s /factorio/saves /opt/factorio/saves && \ && ln -s /factorio/saves /opt/factorio/saves \
ln -s /factorio/mods /opt/factorio/mods && ln -s /factorio/mods /opt/factorio/mods
VOLUME /factorio VOLUME /factorio

View File

@ -7,18 +7,18 @@ ENV PORT=34197 \
VERSION=0.15.40 \ VERSION=0.15.40 \
SHA1=f79a975f6b8c0ee87e2fa60f7d1f7133f332c3ec SHA1=f79a975f6b8c0ee87e2fa60f7d1f7133f332c3ec
RUN mkdir -p /opt && \ RUN mkdir -p /opt \
apk add --update --no-cache tini pwgen && \ && apk add --update --no-cache tini pwgen \
apk add --update --no-cache --virtual .build-deps curl && \ && apk add --update --no-cache --virtual .build-deps curl \
curl -sSL https://www.factorio.com/get-download/$VERSION/headless/linux64 \ && curl -sSL https://www.factorio.com/get-download/$VERSION/headless/linux64 \
-o /tmp/factorio_headless_x64_$VERSION.tar.xz && \ -o /tmp/factorio_headless_x64_$VERSION.tar.xz \
echo "$SHA1 /tmp/factorio_headless_x64_$VERSION.tar.xz" | sha1sum -c && \ && echo "$SHA1 /tmp/factorio_headless_x64_$VERSION.tar.xz" | sha1sum -c \
tar xf /tmp/factorio_headless_x64_$VERSION.tar.xz --directory /opt && \ && tar xf /tmp/factorio_headless_x64_$VERSION.tar.xz --directory /opt \
chmod -R ugo=rwx /opt/factorio && \ && chmod -R ugo=rwx /opt/factorio \
rm /tmp/factorio_headless_x64_$VERSION.tar.xz && \ && rm /tmp/factorio_headless_x64_$VERSION.tar.xz \
ln -s /factorio/saves /opt/factorio/saves && \ && ln -s /factorio/saves /opt/factorio/saves \
ln -s /factorio/mods /opt/factorio/mods && \ && ln -s /factorio/mods /opt/factorio/mods \
apk del .build-deps && apk del .build-deps
VOLUME /factorio VOLUME /factorio

View File

@ -19,23 +19,23 @@ ENV PORT=34197 \
PUID="$PUID" \ PUID="$PUID" \
PGID="$PGID" PGID="$PGID"
RUN mkdir -p /opt /factorio && \ RUN mkdir -p /opt /factorio \
apk add --update --no-cache pwgen su-exec shadow && \ && apk add --update --no-cache pwgen su-exec shadow \
apk add --update --no-cache --virtual .build-deps curl && \ && apk add --update --no-cache --virtual .build-deps curl \
curl -sSL https://www.factorio.com/get-download/$VERSION/headless/linux64 \ && curl -sSL https://www.factorio.com/get-download/$VERSION/headless/linux64 \
-o /tmp/factorio_headless_x64_$VERSION.tar.xz && \ -o /tmp/factorio_headless_x64_$VERSION.tar.xz \
echo "$SHA1 /tmp/factorio_headless_x64_$VERSION.tar.xz" | sha1sum -c && \ && echo "$SHA1 /tmp/factorio_headless_x64_$VERSION.tar.xz" | sha1sum -c \
tar xf /tmp/factorio_headless_x64_$VERSION.tar.xz --directory /opt && \ && tar xf /tmp/factorio_headless_x64_$VERSION.tar.xz --directory /opt \
chmod ugo=rwx /opt/factorio && \ && chmod ugo=rwx /opt/factorio \
rm /tmp/factorio_headless_x64_$VERSION.tar.xz && \ && rm /tmp/factorio_headless_x64_$VERSION.tar.xz \
ln -s $SAVES /opt/factorio/saves && \ && ln -s $SAVES /opt/factorio/saves \
ln -s $MODS /opt/factorio/mods && \ && ln -s $MODS /opt/factorio/mods \
ln -s $SCENARIOS /opt/factorio/scenarios && \ && ln -s $SCENARIOS /opt/factorio/scenarios \
ln -s $SCRIPTOUTPUT /opt/factorio/script-output && \ && ln -s $SCRIPTOUTPUT /opt/factorio/script-output \
apk del .build-deps && \ && apk del .build-deps \
addgroup -g $PGID -S $GROUP && \ && addgroup -g $PGID -S $GROUP \
adduser -u $PUID -G $GROUP -s /bin/sh -SDH $USER && \ && adduser -u $PUID -G $GROUP -s /bin/sh -SDH $USER \
chown -R $USER:$GROUP /opt/factorio /factorio && chown -R $USER:$GROUP /opt/factorio /factorio
VOLUME /factorio VOLUME /factorio

View File

@ -19,21 +19,23 @@ ENV PORT=34197 \
PUID="$PUID" \ PUID="$PUID" \
PGID="$PGID" PGID="$PGID"
RUN mkdir -p /opt /factorio && \ RUN set -ox pipefail \
apk add --update --no-cache --no-progress bash binutils curl gettext jq libintl pwgen shadow su-exec && \ && archive="/tmp/factorio_headless_x64_$VERSION.tar.xz" \
curl -sSL "https://www.factorio.com/get-download/$VERSION/headless/linux64" \ && mkdir -p /opt /factorio \
-o /tmp/factorio_headless_x64_$VERSION.tar.xz && \ && apk add --update --no-cache --no-progress bash binutils curl file gettext jq libintl pwgen shadow su-exec \
echo "$SHA1 /tmp/factorio_headless_x64_$VERSION.tar.xz" | sha1sum -c && \ && curl -sSL "https://www.factorio.com/get-download/$VERSION/headless/linux64" -o "$archive" \
tar xf "/tmp/factorio_headless_x64_$VERSION.tar.xz" --directory /opt && \ && echo "$SHA1 $archive" | sha1sum -c \
chmod ugo=rwx /opt/factorio && \ || (sha1sum "$archive" && file "$archive" && exit 1) \
rm "/tmp/factorio_headless_x64_$VERSION.tar.xz" && \ && tar xf "$archive" --directory /opt \
ln -s "$SAVES" /opt/factorio/saves && \ && chmod ugo=rwx /opt/factorio \
ln -s "$MODS" /opt/factorio/mods && \ && rm "$archive" \
ln -s "$SCENARIOS" /opt/factorio/scenarios && \ && ln -s "$SAVES" /opt/factorio/saves \
ln -s "$SCRIPTOUTPUT" /opt/factorio/script-output && \ && ln -s "$MODS" /opt/factorio/mods \
addgroup -g "$PGID" -S "$GROUP" && \ && ln -s "$SCENARIOS" /opt/factorio/scenarios \
adduser -u "$PUID" -G "$GROUP" -s /bin/sh -SDH "$USER" && \ && ln -s "$SCRIPTOUTPUT" /opt/factorio/script-output \
chown -R "$USER":"$GROUP" /opt/factorio /factorio && addgroup -g "$PGID" -S "$GROUP" \
&& adduser -u "$PUID" -G "$GROUP" -s /bin/sh -SDH "$USER" \
&& chown -R "$USER":"$GROUP" /opt/factorio /factorio
VOLUME /factorio VOLUME /factorio