Giter Site home page Giter Site logo

taylorsilva / dcind Goto Github PK

View Code? Open in Web Editor NEW

This project forked from meamidos/dcind

8.0 2.0 6.0 54 KB

Alpine image with Docker Compose. Useful as a base image for integration tests in Concourse

License: MIT License

Shell 78.89% Dockerfile 16.50% Makefile 4.62%
concourse concourse-ci ci ci-cd

dcind's Issues

Is there a build of this image anywhere?

It is great that there are newer branches of this docker-in-docker use case.

The readme shows a non working link to a build. Is this image built and available in a public registry? Or will users need to build from the repo and upload back to their own registry?

mount: /sys/fs/cgroup/cpuset: permission denied.

When trying to run it with concourse I get mount: /sys/fs/cgroup/cpuset: permission denied.
I have the privileged flag set so I'm not sure what is causing this. I'm running concourse itself with docker-compose so that's theoretically three layers of docker, don't know if this is relevant for my problem.

My task looks like this:

  - task: integration-test
    privileged: true
    #image: docker-compose
    config:
      image_resource:
        type: docker-image
        source:
          repository: taylorsilva/dcind
      inputs:
      - name: controller-code # we need that only for the compose file
      platform: linux
      run:
        path: bash
        args:
          - -exc
          - |
            source /docker-lib.sh
            start_docker

The full output is:

selected worker: 3a67589a1aec
+ source /docker-lib.sh
++ LOG_FILE=/tmp/docker.log
++ SKIP_PRIVILEGED=false
++ STARTUP_TIMEOUT=20
++ DOCKER_DATA_ROOT=/scratch/docker
+ start_docker
+ echo 'Starting Docker...'
Starting Docker...
+ '[' -f /tmp/docker.pid ']'
+ mkdir -p /var/log
+ mkdir -p /var/run
+ '[' false = false ']'
+ sanitize_cgroups
+ mkdir -p /sys/fs/cgroup
+ mountpoint -q /sys/fs/cgroup
+ mount -o remount,rw /sys/fs/cgroup
+ sed -e 1d /proc/cgroups
+ read sys hierarchy num enabled
+ '[' 1 '!=' 1 ']'
++ ++ cut -d: -f2
grep '\<cpuset\>'
++ cat /proc/self/cgroup
+ grouping=
+ true
+ '[' -z '' ']'
+ grouping=cpuset
+ mountpoint=/sys/fs/cgroup/cpuset
+ mkdir -p /sys/fs/cgroup/cpuset
+ mountpoint -q /sys/fs/cgroup/cpuset
+ mount -n -t cgroup -o cpuset cgroup /sys/fs/cgroup/cpuset
mount: /sys/fs/cgroup/cpuset: permission denied.

Thank you for your help

Binary installation of docker-compose fails

I tried to have the image do a binary installation of docker-compose, following https://github.com/docker/docker.github.io/blob/master/compose/install.md#install-compose-on-linux-systems

but trying to run docker-compose kept failing with

bash-5.1# docker-compose
bash: /usr/local/bin/docker-compose: No such file or directory

Doing ls -l on /usr/local/bin/docker-compose showed that the file does exist though. The images PATH also contains /usr/local/bin. I'm not sure what it's referring to when it says No such file or directory.

So I reverted back to using pip to install. Using pip adds a lot of time (~6mins) to the build because of this "wheel building" step:

#6 59.43 Building wheels for collected packages: bcrypt, cryptography, pynacl, PyYAML
#6 59.44   Building wheel for bcrypt (PEP 517): started
#6 61.90   Building wheel for bcrypt (PEP 517): finished with status 'done'
#6 61.90   Created wheel for bcrypt: filename=bcrypt-3.2.0-cp38-cp38-linux_x86_64.whl size=64444 sha256=c1d6a2ebbe1e35e774b8dc500c68563a721de4f554ddb5f5fd40d387d21faa76
#6 61.90   Stored in directory: /root/.cache/pip/wheels/af/42/cb/78425eb7d565a75b710a82f213c19f7100b873af40ddb372fc
#6 61.91   Building wheel for cryptography (PEP 517): started
#6 125.5   Building wheel for cryptography (PEP 517): still running...

It would be nice to get the binary installation working and have the build time take <1min.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.