mirror of https://github.com/XEphem/XEphem.git
Docker: fix container names; support --no-cache
This commit is contained in:
parent
625bc9b878
commit
1a890b614c
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
NAME=xephem-ubuntu-14.04
|
||||||
|
|
||||||
if [ ! -f /usr/bin/docker ]
|
if [ ! -f /usr/bin/docker ]
|
||||||
then
|
then
|
||||||
|
|
@ -15,7 +16,14 @@ cd "$(dirname $0)"
|
||||||
# Build the Docker image from the instructions in the Dockerfile.
|
# Build the Docker image from the instructions in the Dockerfile.
|
||||||
# Name the resulting image "xephem".
|
# Name the resulting image "xephem".
|
||||||
|
|
||||||
docker build -t xephem-ubuntu-14.04 . 1>&2
|
if [ "$1" = "--no-cache" ]
|
||||||
|
then
|
||||||
|
NO_CACHE=--no-cache
|
||||||
|
shift
|
||||||
|
else
|
||||||
|
NO_CACHE=
|
||||||
|
fi
|
||||||
|
docker build -t $NAME . 1>&2 $NO_CACHE
|
||||||
|
|
||||||
# Run the "xephem" image, exposing several files from the host system
|
# Run the "xephem" image, exposing several files from the host system
|
||||||
# that together should let XEphem run and connect to X Windows:
|
# that together should let XEphem run and connect to X Windows:
|
||||||
|
|
@ -30,5 +38,5 @@ exec docker run -ti \
|
||||||
-v ${PWD}/../..:/src \
|
-v ${PWD}/../..:/src \
|
||||||
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||||
-v ${XAUTHORITY}:/root/.Xauthority \
|
-v ${XAUTHORITY}:/root/.Xauthority \
|
||||||
xephem-ubuntu-14.04 \
|
$NAME \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
NAME=xephem-ubuntu-20.04
|
||||||
|
|
||||||
if [ ! -f /usr/bin/docker ]
|
if [ ! -f /usr/bin/docker ]
|
||||||
then
|
then
|
||||||
|
|
@ -15,7 +16,14 @@ cd "$(dirname $0)"
|
||||||
# Build the Docker image from the instructions in the Dockerfile.
|
# Build the Docker image from the instructions in the Dockerfile.
|
||||||
# Name the resulting image "xephem".
|
# Name the resulting image "xephem".
|
||||||
|
|
||||||
docker build -t xephem-ubuntu-14.04 . 1>&2
|
if [ "$1" = "--no-cache" ]
|
||||||
|
then
|
||||||
|
NO_CACHE=--no-cache
|
||||||
|
shift
|
||||||
|
else
|
||||||
|
NO_CACHE=
|
||||||
|
fi
|
||||||
|
docker build -t $NAME . 1>&2 $NO_CACHE
|
||||||
|
|
||||||
# Run the "xephem" image, exposing several files from the host system
|
# Run the "xephem" image, exposing several files from the host system
|
||||||
# that together should let XEphem run and connect to X Windows:
|
# that together should let XEphem run and connect to X Windows:
|
||||||
|
|
@ -30,5 +38,5 @@ exec docker run -ti \
|
||||||
-v ${PWD}/../..:/src \
|
-v ${PWD}/../..:/src \
|
||||||
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||||
-v ${XAUTHORITY}:/root/.Xauthority \
|
-v ${XAUTHORITY}:/root/.Xauthority \
|
||||||
xephem-ubuntu-14.04 \
|
$NAME \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
NAME=xephem-ubuntu-21.04
|
||||||
|
|
||||||
if [ ! -f /usr/bin/docker ]
|
if [ ! -f /usr/bin/docker ]
|
||||||
then
|
then
|
||||||
|
|
@ -15,7 +16,14 @@ cd "$(dirname $0)"
|
||||||
# Build the Docker image from the instructions in the Dockerfile.
|
# Build the Docker image from the instructions in the Dockerfile.
|
||||||
# Name the resulting image "xephem".
|
# Name the resulting image "xephem".
|
||||||
|
|
||||||
docker build -t xephem-ubuntu-14.04 . 1>&2
|
if [ "$1" = "--no-cache" ]
|
||||||
|
then
|
||||||
|
NO_CACHE=--no-cache
|
||||||
|
shift
|
||||||
|
else
|
||||||
|
NO_CACHE=
|
||||||
|
fi
|
||||||
|
docker build -t $NAME . 1>&2 $NO_CACHE
|
||||||
|
|
||||||
# Run the "xephem" image, exposing several files from the host system
|
# Run the "xephem" image, exposing several files from the host system
|
||||||
# that together should let XEphem run and connect to X Windows:
|
# that together should let XEphem run and connect to X Windows:
|
||||||
|
|
@ -30,5 +38,5 @@ exec docker run -ti \
|
||||||
-v ${PWD}/../..:/src \
|
-v ${PWD}/../..:/src \
|
||||||
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||||
-v ${XAUTHORITY}:/root/.Xauthority \
|
-v ${XAUTHORITY}:/root/.Xauthority \
|
||||||
xephem-ubuntu-14.04 \
|
$NAME \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue