mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
ci: Add "--push" argument to run-docker.sh help script
Also there is no need to run docker as root, the user just needs to be in the "docker" group.
This commit is contained in:
parent
94748af0e1
commit
ca2fc30dea
@ -4,8 +4,14 @@ set -e
|
|||||||
|
|
||||||
TAG="registry.gitlab.gnome.org/gnome/glib/master:v4"
|
TAG="registry.gitlab.gnome.org/gnome/glib/master:v4"
|
||||||
|
|
||||||
sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
|
docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
|
||||||
--file "Dockerfile" .
|
--file "Dockerfile" .
|
||||||
sudo docker run --rm \
|
|
||||||
--volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
|
if [ "$1" = "--push" ]; then
|
||||||
--tty --interactive "${TAG}" bash
|
docker login registry.gitlab.gnome.org
|
||||||
|
docker push $TAG
|
||||||
|
else
|
||||||
|
docker run --rm \
|
||||||
|
--volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
|
||||||
|
--tty --interactive "${TAG}" bash
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user