summaryrefslogtreecommitdiff
path: root/.gitlab-ci/run-docker.sh
blob: f34ccbdf9c881ba88c0346196bab6a881be49505 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

set -e

TAG="registry.gitlab.gnome.org/gnome/libsoup/master:v1"

cd "$(dirname "$0")"
docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
    --file "Dockerfile" .

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