Compare commits

...

7 Commits

6 changed files with 29 additions and 19 deletions

View File

@ -1,4 +1,4 @@
FROM frolvlad/alpine-glibc:alpine-3.9 FROM frolvlad/alpine-glibc:alpine-3.11
LABEL maintainer="https://github.com/factoriotools/factorio-docker" LABEL maintainer="https://github.com/factoriotools/factorio-docker"

View File

@ -1,4 +1,4 @@
FROM frolvlad/alpine-glibc:alpine-3.9 FROM frolvlad/alpine-glibc:alpine-3.11
LABEL maintainer="https://github.com/factoriotools/factorio-docker" LABEL maintainer="https://github.com/factoriotools/factorio-docker"

View File

@ -1,4 +1,4 @@
FROM frolvlad/alpine-glibc:alpine-3.9 FROM frolvlad/alpine-glibc:alpine-3.11
LABEL maintainer="https://github.com/factoriotools/factorio-docker" LABEL maintainer="https://github.com/factoriotools/factorio-docker"

View File

@ -1,4 +1,4 @@
FROM frolvlad/alpine-glibc:alpine-3.9 FROM frolvlad/alpine-glibc:alpine-3.11
LABEL maintainer="https://github.com/factoriotools/factorio-docker" LABEL maintainer="https://github.com/factoriotools/factorio-docker"
@ -19,6 +19,7 @@ ENV PORT=34197 \
PUID="$PUID" \ PUID="$PUID" \
PGID="$PGID" PGID="$PGID"
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
RUN set -ox pipefail \ RUN set -ox pipefail \
&& archive="/tmp/factorio_headless_x64_$VERSION.tar.xz" \ && archive="/tmp/factorio_headless_x64_$VERSION.tar.xz" \
&& mkdir -p /opt /factorio \ && mkdir -p /opt /factorio \
@ -29,10 +30,12 @@ RUN set -ox pipefail \
&& tar xf "$archive" --directory /opt \ && tar xf "$archive" --directory /opt \
&& chmod ugo=rwx /opt/factorio \ && chmod ugo=rwx /opt/factorio \
&& rm "$archive" \ && rm "$archive" \
&& ln -s "$SAVES" /opt/factorio/saves \ && mkdir -p /opt/factorio/config/ \
&& ln -s "$MODS" /opt/factorio/mods \ && printf "\
&& ln -s "$SCENARIOS" /opt/factorio/scenarios \ [path]\n\
&& ln -s "$SCRIPTOUTPUT" /opt/factorio/script-output \ read-data=__PATH__executable__/../../data\n\
write-data=/factorio\n\
" >> /opt/factorio/config/config.ini \
&& 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

View File

@ -1,4 +1,4 @@
FROM frolvlad/alpine-glibc:alpine-3.9 FROM frolvlad/alpine-glibc:alpine-3.11
LABEL maintainer="https://github.com/factoriotools/factorio-docker" LABEL maintainer="https://github.com/factoriotools/factorio-docker"
@ -19,6 +19,7 @@ ENV PORT=34197 \
PUID="$PUID" \ PUID="$PUID" \
PGID="$PGID" PGID="$PGID"
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
RUN set -ox pipefail \ RUN set -ox pipefail \
&& archive="/tmp/factorio_headless_x64_$VERSION.tar.xz" \ && archive="/tmp/factorio_headless_x64_$VERSION.tar.xz" \
&& mkdir -p /opt /factorio \ && mkdir -p /opt /factorio \
@ -29,10 +30,12 @@ RUN set -ox pipefail \
&& tar xf "$archive" --directory /opt \ && tar xf "$archive" --directory /opt \
&& chmod ugo=rwx /opt/factorio \ && chmod ugo=rwx /opt/factorio \
&& rm "$archive" \ && rm "$archive" \
&& ln -s "$SAVES" /opt/factorio/saves \ && mkdir -p /opt/factorio/config/ \
&& ln -s "$MODS" /opt/factorio/mods \ && printf "\
&& ln -s "$SCENARIOS" /opt/factorio/scenarios \ [path]\n\
&& ln -s "$SCRIPTOUTPUT" /opt/factorio/script-output \ read-data=__PATH__executable__/../../data\n\
write-data=/factorio\n\
" >> /opt/factorio/config/config.ini \
&& 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

View File

@ -27,8 +27,10 @@ else
elif [[ $VERSION == "${TRAVIS_BRANCH%-*}" ]]; then elif [[ $VERSION == "${TRAVIS_BRANCH%-*}" ]]; then
TAGS="-t $DOCKER_REPO:$TRAVIS_BRANCH -t $DOCKER_REPO:$VERSION -t $DOCKER_REPO:$VERSION_SHORT" TAGS="-t $DOCKER_REPO:$TRAVIS_BRANCH -t $DOCKER_REPO:$VERSION -t $DOCKER_REPO:$VERSION_SHORT"
# we build a other branch than master # we build a other branch than master
elif [[ -n $TRAVIS_BRANCH ]]; then # disabled for now cause it breaks Travis CI builds of dependabot
TAGS="-t $DOCKER_REPO:$TRAVIS_BRANCH" # https://travis-ci.org/github/factoriotools/factorio-docker/jobs/688176474#L182
# elif [[ -n $TRAVIS_BRANCH ]]; then
# TAGS="-t $DOCKER_REPO:$TRAVIS_BRANCH"
fi fi
else else
# we are not in CI and tag version and version short # we are not in CI and tag version and version short
@ -68,13 +70,15 @@ if [[ $(dirname "$(git diff --name-only HEAD^)") =~ $VERSION_SHORT ]] && [[ ${TR
fi fi
# push a tag on a branch other than master # push a tag on a branch other than master
if [[ -n ${TRAVIS_BRANCH:-} ]] && [[ $VERSION != "${TRAVIS_BRANCH_VERSION:-}" ]] && [[ ${TRAVIS_BRANCH:-} != "master" ]]; then # disabled for now cause it breaks Travis CI builds of dependabot
docker push "$DOCKER_REPO:$TRAVIS_BRANCH" # https://travis-ci.org/github/factoriotools/factorio-docker/jobs/688176474#L182
fi # if [[ -n ${TRAVIS_BRANCH:-} ]] && [[ $VERSION != "${TRAVIS_BRANCH_VERSION:-}" ]] && [[ ${TRAVIS_BRANCH:-} != "master" ]]; then
# docker push "$DOCKER_REPO:$TRAVIS_BRANCH"
# fi
# push an incremental tag # push an incremental tag
if [[ $VERSION == "${TRAVIS_BRANCH_VERSION:-}" ]]; then if [[ $VERSION == "${TRAVIS_BRANCH_VERSION:-}" ]]; then
docker push "$DOCKER_REPO:$TRAVIS_BRANCH" docker push "$DOCKER_REPO:$VERSION"
fi fi
if [[ -n ${TRAVIS_TAG:-} ]] || [[ -z ${CI:-} ]]; then if [[ -n ${TRAVIS_TAG:-} ]] || [[ -z ${CI:-} ]]; then