mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +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"
|
||||
|
||||
sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
|
||||
docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
|
||||
--file "Dockerfile" .
|
||||
sudo docker run --rm \
|
||||
--volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
|
||||
--tty --interactive "${TAG}" bash
|
||||
|
||||
if [ "$1" = "--push" ]; then
|
||||
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