summaryrefslogtreecommitdiff
path: root/.gitlab-ci/run-docker.sh
blob: 70678c32c4b7ac5eecc49ab8aae0aeaf79286ebe (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:v3"

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