mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2025-07-01 14:38:05 +02:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
4e261043cd | |||
4c47dbc4ee | |||
07264e626f | |||
64a1f8d9bf | |||
15a2d493f8 | |||
3777041d3e | |||
ccd0707d21 |
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
@ -19,6 +19,7 @@ ENV PORT=34197 \
|
||||
PUID="$PUID" \
|
||||
PGID="$PGID"
|
||||
|
||||
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
|
||||
RUN set -ox pipefail \
|
||||
&& archive="/tmp/factorio_headless_x64_$VERSION.tar.xz" \
|
||||
&& mkdir -p /opt /factorio \
|
||||
@ -29,10 +30,12 @@ RUN set -ox pipefail \
|
||||
&& tar xf "$archive" --directory /opt \
|
||||
&& chmod ugo=rwx /opt/factorio \
|
||||
&& rm "$archive" \
|
||||
&& ln -s "$SAVES" /opt/factorio/saves \
|
||||
&& ln -s "$MODS" /opt/factorio/mods \
|
||||
&& ln -s "$SCENARIOS" /opt/factorio/scenarios \
|
||||
&& ln -s "$SCRIPTOUTPUT" /opt/factorio/script-output \
|
||||
&& mkdir -p /opt/factorio/config/ \
|
||||
&& printf "\
|
||||
[path]\n\
|
||||
read-data=__PATH__executable__/../../data\n\
|
||||
write-data=/factorio\n\
|
||||
" >> /opt/factorio/config/config.ini \
|
||||
&& addgroup -g "$PGID" -S "$GROUP" \
|
||||
&& adduser -u "$PUID" -G "$GROUP" -s /bin/sh -SDH "$USER" \
|
||||
&& chown -R "$USER":"$GROUP" /opt/factorio /factorio
|
||||
|
@ -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"
|
||||
|
||||
@ -19,6 +19,7 @@ ENV PORT=34197 \
|
||||
PUID="$PUID" \
|
||||
PGID="$PGID"
|
||||
|
||||
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
|
||||
RUN set -ox pipefail \
|
||||
&& archive="/tmp/factorio_headless_x64_$VERSION.tar.xz" \
|
||||
&& mkdir -p /opt /factorio \
|
||||
@ -29,10 +30,12 @@ RUN set -ox pipefail \
|
||||
&& tar xf "$archive" --directory /opt \
|
||||
&& chmod ugo=rwx /opt/factorio \
|
||||
&& rm "$archive" \
|
||||
&& ln -s "$SAVES" /opt/factorio/saves \
|
||||
&& ln -s "$MODS" /opt/factorio/mods \
|
||||
&& ln -s "$SCENARIOS" /opt/factorio/scenarios \
|
||||
&& ln -s "$SCRIPTOUTPUT" /opt/factorio/script-output \
|
||||
&& mkdir -p /opt/factorio/config/ \
|
||||
&& printf "\
|
||||
[path]\n\
|
||||
read-data=__PATH__executable__/../../data\n\
|
||||
write-data=/factorio\n\
|
||||
" >> /opt/factorio/config/config.ini \
|
||||
&& addgroup -g "$PGID" -S "$GROUP" \
|
||||
&& adduser -u "$PUID" -G "$GROUP" -s /bin/sh -SDH "$USER" \
|
||||
&& chown -R "$USER":"$GROUP" /opt/factorio /factorio
|
||||
|
16
build.sh
16
build.sh
@ -27,8 +27,10 @@ else
|
||||
elif [[ $VERSION == "${TRAVIS_BRANCH%-*}" ]]; then
|
||||
TAGS="-t $DOCKER_REPO:$TRAVIS_BRANCH -t $DOCKER_REPO:$VERSION -t $DOCKER_REPO:$VERSION_SHORT"
|
||||
# we build a other branch than master
|
||||
elif [[ -n $TRAVIS_BRANCH ]]; then
|
||||
TAGS="-t $DOCKER_REPO:$TRAVIS_BRANCH"
|
||||
# disabled for now cause it breaks Travis CI builds of dependabot
|
||||
# https://travis-ci.org/github/factoriotools/factorio-docker/jobs/688176474#L182
|
||||
# elif [[ -n $TRAVIS_BRANCH ]]; then
|
||||
# TAGS="-t $DOCKER_REPO:$TRAVIS_BRANCH"
|
||||
fi
|
||||
else
|
||||
# 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
|
||||
|
||||
# push a tag on a branch other than master
|
||||
if [[ -n ${TRAVIS_BRANCH:-} ]] && [[ $VERSION != "${TRAVIS_BRANCH_VERSION:-}" ]] && [[ ${TRAVIS_BRANCH:-} != "master" ]]; then
|
||||
docker push "$DOCKER_REPO:$TRAVIS_BRANCH"
|
||||
fi
|
||||
# disabled for now cause it breaks Travis CI builds of dependabot
|
||||
# https://travis-ci.org/github/factoriotools/factorio-docker/jobs/688176474#L182
|
||||
# if [[ -n ${TRAVIS_BRANCH:-} ]] && [[ $VERSION != "${TRAVIS_BRANCH_VERSION:-}" ]] && [[ ${TRAVIS_BRANCH:-} != "master" ]]; then
|
||||
# docker push "$DOCKER_REPO:$TRAVIS_BRANCH"
|
||||
# fi
|
||||
|
||||
# push an incremental tag
|
||||
if [[ $VERSION == "${TRAVIS_BRANCH_VERSION:-}" ]]; then
|
||||
docker push "$DOCKER_REPO:$TRAVIS_BRANCH"
|
||||
docker push "$DOCKER_REPO:$VERSION"
|
||||
fi
|
||||
|
||||
if [[ -n ${TRAVIS_TAG:-} ]] || [[ -z ${CI:-} ]]; then
|
||||
|
Reference in New Issue
Block a user