docker file input runs forever
When i try to run a docker container with file input the build hangs until timeout docker-compose -f docker-compose.tools.yml run --rm -T mysql-client < docker/db-master/user-web.sql
i use gitlab/gitlab-runner:alpine-v9.2.0
.
.gitlab-ci.yml
image: docker:17.05.0-git
variables:
DOCKER_DRIVER: overlay
COMPOSE_HTTP_TIMEOUT: '120'
GIT_STRATEGY: clone
cache:
paths:
- vendor/
services:
- docker:17.05.0-dind
stages:
- build
- trigger
before_script:
# install git-lfs
- apk add --no-cache openssl
- wget -qO- https://github.com/git-lfs/git-lfs/releases/download/v2.1.1/git-lfs-linux-amd64-2.1.1.tar.gz | tar xz
- mv git-lfs-*/git-lfs /usr/bin/ && rm -rf git-lfs-* && git lfs install && git lfs pull
# Remove lfs hook (https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/2245)
- rm .git/hooks/post-checkout || true
# install docker-compose
- apk add --no-cache py-pip
- pip install docker-compose
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
build_image:
stage: build
script:
- docker-compose build
- docker-compose -f docker-compose.yml -f docker-compose.ci.yml up -d
- docker-compose -f docker-compose.tools.yml run --rm -T mysql-client < docker/db-master/user-web.sql
docker-compose.tools.yml
version: '3'
services:
mysql-client:
image: mariadb:10.1.24
entrypoint: ["sh", "-c", "exec mysql -hdb-master -p$${MYSQL_ROOT_PASSWORD}"]
command: ""
environment:
- MYSQL_ROOT_PASSWORD=***
volumes:
- ./:/code
any hints?
Edited by Gordon Franke