mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2024-12-26 02:48:23 +01:00
moved entry points to /; dont put hard link in place of entrypoint folder
This commit is contained in:
parent
10f891cabf
commit
66bef56cd2
@ -14,8 +14,7 @@ ENV PORT=34197 \
|
||||
SAVES=/factorio/saves \
|
||||
CONFIG=/factorio/config \
|
||||
MODS=/factorio/mods \
|
||||
SCENARIOS=/factorio/scenarios \
|
||||
ENTRYPOINTS=/factorio/entrypoints
|
||||
SCENARIOS=/factorio/scenarios
|
||||
|
||||
RUN mkdir -p /opt /factorio && \
|
||||
apk add --update --no-cache pwgen && \
|
||||
@ -26,10 +25,9 @@ RUN mkdir -p /opt /factorio && \
|
||||
tar xf /tmp/factorio_headless_x64_$VERSION.tar.xz --directory /opt && \
|
||||
chmod ugo=rwx /opt/factorio && \
|
||||
rm /tmp/factorio_headless_x64_$VERSION.tar.xz && \
|
||||
ln -s -f $SAVES /opt/factorio/saves && \
|
||||
ln -s -f $MODS /opt/factorio/mods && \
|
||||
ln -s -f $SCENARIOS /opt/factorio/scenarios && \
|
||||
ln -s -f $ENTRYPOINTS /opt/factorio/entrypoints && \
|
||||
ln -s $SAVES /opt/factorio/saves && \
|
||||
ln -s $MODS /opt/factorio/mods && \
|
||||
ln -s $SCENARIOS /opt/factorio/scenarios && \
|
||||
apk del .build-deps && \
|
||||
addgroup -g $PGID -S $GROUP && \
|
||||
adduser -u $PUID -G $GROUP -s /bin/sh -SDH $USER && \
|
||||
@ -40,11 +38,8 @@ VOLUME /factorio
|
||||
EXPOSE $PORT/udp $RCON_PORT/tcp
|
||||
|
||||
COPY ./docker-entrypoint.sh /
|
||||
COPY ./scenario2map.sh /factorio/entrypoints
|
||||
COPY ./scenario.sh /factorio/entrypoints
|
||||
|
||||
#symbolic link the default entrypoint to the entrypoints directory so it can be inspected and copied to new entrypoints
|
||||
#RUN ln -s -f /docker-entrypoint.sh $ENTRYPOINTS/docker-entrypoint.sh
|
||||
COPY ./scenario2map.sh /
|
||||
COPY ./scenario.sh /
|
||||
|
||||
USER $USER
|
||||
|
||||
|
@ -7,8 +7,7 @@ id
|
||||
mkdir -p $SAVES
|
||||
mkdir -p $CONFIG
|
||||
mkdir -p $MODS
|
||||
|
||||
#chown -R factorio /factorio
|
||||
mkdir -p $SCENARIOS
|
||||
|
||||
if [ ! -f $CONFIG/rconpw ]; then
|
||||
echo $(pwgen 15 1) > $CONFIG/rconpw
|
||||
|
@ -9,11 +9,6 @@ set -e
|
||||
|
||||
id
|
||||
|
||||
SAVES=/factorio/saves
|
||||
CONFIG=/factorio/config
|
||||
MODS=/factorio/mods
|
||||
SCENARIOS=/factorio/scenarios
|
||||
|
||||
mkdir -p $SAVES
|
||||
mkdir -p $CONFIG
|
||||
mkdir -p $MODS
|
||||
|
@ -9,18 +9,11 @@ set -e
|
||||
|
||||
id
|
||||
|
||||
SAVES=/factorio/saves
|
||||
CONFIG=/factorio/config
|
||||
MODS=/factorio/mods
|
||||
SCENARIOS=/factorio/scenarios
|
||||
|
||||
mkdir -p $SAVES
|
||||
mkdir -p $CONFIG
|
||||
mkdir -p $MODS
|
||||
mkdir -p $SCENARIOS
|
||||
|
||||
#chown -R factorio /factorio
|
||||
|
||||
if [ ! -f $CONFIG/server-settings.json ]; then
|
||||
cp /opt/factorio/data/server-settings.example.json $CONFIG/server-settings.json
|
||||
fi
|
||||
|
@ -124,7 +124,7 @@ docker run -d \
|
||||
-v /opt/factorio:/factorio \
|
||||
--name factorio \
|
||||
--restart=always \
|
||||
--entrypoint "/factorio/entrypoints/scenario.sh" \
|
||||
--entrypoint "/scenario.sh" \
|
||||
dtandersen/factorio \
|
||||
MyScenarioName
|
||||
```
|
||||
@ -140,7 +140,7 @@ docker run -d \
|
||||
-v /opt/factorio:/factorio \
|
||||
--name factorio \
|
||||
--restart=always \
|
||||
--entrypoint "/factorio/entrypoints/scenario2map.sh" \
|
||||
--entrypoint "/scenario2map.sh" \
|
||||
dtandersen/factorio
|
||||
MyScenarioName
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user