Git Product home page Git Product logo

concourse-docker-compose-resource's Introduction

Ahoy! ๐Ÿ‘‹

Staff Solutions Architect at Collective[i].

Things I like:

  • Rust, my current favourite language
  • Good automation
  • Drawing weird stuff
  • Motorcycles

concourse-docker-compose-resource's People

Contributors

troykinsella avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

concourse-docker-compose-resource's Issues

concourse job fails

I'm trying to use this in my pipeline to restart a container I have on another host.

I get the following error

docker-compose version 1.24.1, build 4667896b
Found orphan containers (goesutils) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Removing network docker_default
error while removing network: network docker_default id 10ff279db9ede0125643070777bd58b8469423c8f4d25daf127f9a9375464c8b has active endpoints

Here is my pipeline.yml
https://gist.github.com/hemna/12170932b4f5014819e06717d0cd121f

can't build the docker image.

waboring@dl360-1:~/devel/docker/concourse-docker-compose-resource:(git::tags/1.2.0) $  docker build .
Sending build context to Docker daemon  291.3kB
Step 1/9 : FROM docker/compose:1.24.1 as main
1.24.1: Pulling from docker/compose
c87736221ed0: Pull complete
ba1ee912e9a7: Pull complete
2df7dacacdeb: Pull complete
6037f24be055: Pull complete
Digest: sha256:8616a861a5c769b7fe633625a4d5a4f76ae5a54d1d04874dcef827644c136684
Status: Downloaded newer image for docker/compose:1.24.1
 ---> 9bd979cced2e
Step 2/9 : LABEL maintainer="Troy Kinsella <[email protected]>"
 ---> Running in 619746de1543
Removing intermediate container 619746de1543
 ---> 9b342f3815e1
Step 3/9 : RUN set -eux  && apk update  && apk upgrade  && apk add bash jq  && rm -rf /var/cache/apk/*
 ---> Running in 47a371298ad1
+ apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
v3.8.5-42-g048a098a37 [http://dl-cdn.alpinelinux.org/alpine/v3.8/main]
v3.8.5-37-gf06ffe835a [http://dl-cdn.alpinelinux.org/alpine/v3.8/community]
OK: 9570 distinct packages available
+ apk upgrade
(1/6) Upgrading musl (1.1.19-r10 -> 1.1.19-r11)
(2/6) Upgrading ca-certificates (20190108-r0 -> 20191127-r0)
(3/6) Upgrading musl-utils (1.1.19-r10 -> 1.1.19-r11)
(4/6) Upgrading libcrypto1.0 (1.0.2r-r0 -> 1.0.2u-r0)
(5/6) Upgrading libssl1.0 (1.0.2r-r0 -> 1.0.2u-r0)
(6/6) Upgrading openssl (1.0.2r-r0 -> 1.0.2u-r0)
Executing busybox-1.28.4-r3.trigger
Executing ca-certificates-20191127-r0.trigger
OK: 13 MiB in 19 packages
+ apk add bash jq
(1/7) Installing ncurses-terminfo-base (6.1_p20180818-r1)
(2/7) Installing ncurses-terminfo (6.1_p20180818-r1)
(3/7) Installing ncurses-libs (6.1_p20180818-r1)
(4/7) Installing readline (7.0.003-r0)
(5/7) Installing bash (4.4.19-r1)
Executing bash-4.4.19-r1.post-install
(6/7) Installing oniguruma (6.9.4-r0)
(7/7) Installing jq (1.6_rc1-r1)
Executing busybox-1.28.4-r3.trigger
OK: 23 MiB in 26 packages
+ rm -rf /var/cache/apk/APKINDEX.adfa7ceb.tar.gz /var/cache/apk/APKINDEX.efaa1f73.tar.gz
Removing intermediate container 47a371298ad1
 ---> d99f1d4605c5
Step 4/9 : COPY assets/* /opt/resource/
 ---> 3c682741a9ec
Step 5/9 : FROM main as testing
 ---> 3c682741a9ec
Step 6/9 : RUN set -eux  && apk update  && apk add ruby ruby-json wget  && gem install rspec --no-ri --no-rdoc  && wget -q -O - https://raw.githubusercontent.com/troykinsella/mockleton/master/install.sh | bash  && cp /usr/local/bin/mockleton /usr/bin/docker  && cp /usr/local/bin/mockleton /usr/local/bin/docker-compose  && rm -rf /var/cache/apk/*
 ---> Running in 44bc171b5a88
+ apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
v3.8.5-42-g048a098a37 [http://dl-cdn.alpinelinux.org/alpine/v3.8/main]
v3.8.5-37-gf06ffe835a [http://dl-cdn.alpinelinux.org/alpine/v3.8/community]
OK: 9564 distinct packages available
+ apk add ruby ruby-json wget
(1/6) Installing gmp (6.1.2-r1)
(2/6) Installing yaml (0.1.7-r0)
(3/6) Installing ruby-libs (2.5.8-r0)
(4/6) Installing ruby (2.5.8-r0)
(5/6) Installing ruby-json (2.5.8-r0)
(6/6) Installing wget (1.20.3-r0)
Executing busybox-1.28.4-r3.trigger
OK: 36 MiB in 32 packages
+ gem install rspec --no-ri --no-rdoc
Successfully installed rspec-support-3.9.3
Successfully installed rspec-core-3.9.2
Successfully installed diff-lcs-1.3
Successfully installed rspec-expectations-3.9.1
Successfully installed rspec-mocks-3.9.1
Successfully installed rspec-3.9.0
6 gems installed
+ wget -q -O - https://raw.githubusercontent.com/troykinsella/mockleton/master/install.sh
+ bash
Resolved latest version: v0.1.0
Installed: /usr/local/bin/mockleton
+ cp /usr/local/bin/mockleton /usr/bin/docker
+ cp /usr/local/bin/mockleton /usr/local/bin/docker-compose
+ rm -rf /var/cache/apk/APKINDEX.adfa7ceb.tar.gz /var/cache/apk/APKINDEX.efaa1f73.tar.gz
Removing intermediate container 44bc171b5a88
 ---> 0a7b8e7aad4f
Step 7/9 : COPY . /resource/
 ---> 483049ae97cd
Step 8/9 : RUN set -eux  && cd /resource  && rspec
 ---> Running in f36265cff3b5
+ cd /resource
+ rspec
F.F.F.......................

Failures:

  1) commands:check should exist
     Failure/Error: expect(File.stat(check_file).mode.to_s(8)[3..5]).to eq("755")

       expected: "755"
            got: "775"

       (compared using ==)
     # ./spec/commands/check_spec.rb:9:in `block (2 levels) in <top (required)>'

  2) commands:in should exist
     Failure/Error: expect(File.stat(in_file).mode.to_s(8)[3..5]).to eq("755")

       expected: "755"
            got: "775"

       (compared using ==)
     # ./spec/commands/in_spec.rb:9:in `block (2 levels) in <top (required)>'

  3) commands:out should exist
     Failure/Error: expect(File.stat(out_file).mode.to_s(8)[3..5]).to eq("755")

       expected: "755"
            got: "775"

       (compared using ==)
     # ./spec/commands/out_spec.rb:11:in `block (2 levels) in <top (required)>'

Finished in 38.18 seconds (files took 0.20048 seconds to load)
28 examples, 3 failures

Failed examples:

rspec ./spec/commands/check_spec.rb:7 # commands:check should exist
rspec ./spec/commands/in_spec.rb:7 # commands:in should exist
rspec ./spec/commands/out_spec.rb:9 # commands:out should exist

The command '/bin/sh -c set -eux  && cd /resource  && rspec' returned a non-zero code: 1

Private registry certs on remote hosts

I dont think this is a defect in this plugin, but it might be worth noting in the documentation:

I have a setup for my dev environment where i have a private docker registry running that holds my docker images using a self-signed cert. When using the docker-image resource types, you provide the cert in the pipeline definition so that it can build push the images to the registry. This works because docker is running in the concourse worker container. However, when using this docker-compose resource type, if you are running docker compose against a remote docker host, that certificate has to be installed on that remote host, or docker compose will not be able to pull images from the private registry. It will not use the cert provided in the pipeline file in the ca_certs configuration for the private registry. Might be obvious to people more familiar with docker but it took me a little bit to sort out.

Passing parameters/environment variables to docker-compose

I am trying to set up a Concourse pipeline that uses this resource type to deply to my dev/test environment after a successful build. However, my docker-compose file has some environment variables declared to pass into the containers when started, and i'm not seeing how that's done with either this resource type or concourse in general. From what I can tell from the documentation, the resource type has to explicitly declare the environment variables it will accept from the pipeline. Is this a feature that would need to be added or is there something i'm missing?

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.