Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

Permission error #1

Open
Beanow opened this issue Oct 13, 2017 · 3 comments
Open

Permission error #1

Beanow opened this issue Oct 13, 2017 · 3 comments
Assignees

Comments

@Beanow
Copy link

Beanow commented Oct 13, 2017

Trying to set up CI/CD in swarm mode using this image.
Jobs won't run due to the home volume having wrong permissions.

Running with gitlab-ci-multi-runner 9.5.0 (413da38)
  on 781dfc338f5e (b4abc558)
Using Shell executor...
Running on 17d1a6b06c96...
mkdir: can't create directory '/home/gitlab-runner/builds/': Permission denied
ERROR: Job failed: exit status 1

I'll test a couple of ideas to see if I can propose a solution.

@sgillespie sgillespie self-assigned this Nov 7, 2017
@sgillespie
Copy link
Owner

Can you tell give me more details about the environment? What is the volume created? How is the service created?

@cloudwitch
Copy link

cloudwitch commented Jan 8, 2018

I'm seeing the same error when trying to build a basic docker image. Here is my swarm compose stanza. The image also needs to be updated to the new 10.x gitlab-runner as the multi-runner has been deprecated.

version: "3.4"
services:
  gitlab:
    image: gitlab/gitlab-ce:latest
    ports:
      - 50180:80
      - 50122:22
    networks:
      - gitlab
    deploy:
      replicas: 1
      update_config:
        parallelism: 1
        delay: 10s
      restart_policy:
        condition: any
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        external_url 'http://example.com/git'
    volumes:
      - type: bind
        source: /opt/docker/gitlab/config
        target: /etc/gitlab
      - type: bind
        source: /opt/docker/gitlab/logs
        target: /var/log/gitlab
      - type: bind
        source: /opt/docker/gitlab/data
        target: /var/opt/gitlab
  gitlab_runner:
    image: sgillespie/gitlab-runner
    networks:
      - gitlab
    deploy:
      replicas: 1
      update_config:
        parallelism: 1
        delay: 10s
      restart_policy:
        condition: any
    volumes:
      - type: bind
        source: /opt/docker/gitlab/config
        target: /etc/gitlab
    environment:
      - REGISTRATION_TOKEN=token
      - CI_SERVER_URL=http://gitlab_gitlab/git
      - RUNNER_EXECUTOR=shell
      - RUNNER_SHELL=bash


networks:
  gitlab:

@robbyemmert
Copy link

I'm suddenly also getting this error. Any ideas?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants