0

I am currently trying to build and deploy a dockerized Go project, pulled from a Git repo in using Concourse.

To give you some background about my current setup:

  • I got two AWS Lightsail instances set up, both of them using a Docker container to serve Concourse.
  • One of those instances is serving the web node, the other one is acting as a worker node, which connects to the web node.

My current pipeline looks like this:

resources:
- name: zsu-wasserlabor-api-repo
  type: git
  webhook_token: TOP_SECRET
  source:
    uri: git@github.com:lennartschoch/zsu-wasserlabor-api
    branch: master
    private_key: TOP_SECRET

jobs:
- name: build-api
  plan:
  - get: zsu-wasserlabor-api-repo
    trigger: true
  - task: build
    config:
      platform: linux
      image_resource:
        type: docker-image
        source: {repository: alpine}
      inputs:
      - name: zsu-wasserlabor-api-repo
      run:
        path: sh
        args: 
        - -c
        - |
          cd zsu-wasserlabor-api-repo
          docker-compose build

The problem is that docker-compose is not installed.

I am feeling like I am doing something fundamentally wrong. Could anyone give me a hint?

Best,

Lennart

Lennart Schoch
  • 157
  • 2
  • 3
  • 21

1 Answers1

2

The pipeline described above specifies that it should use the alpine image, which doesn't have docker-compose on it. Thus, you will need to find an image that has docker-compose installed on it, but even then, there are additional steps you will need to take to make it work in Concourse (see this link for more details).

Fortunately, someone has made an image available that takes care of the additional steps, with a sample pipeline that you can find here: https://github.com/meAmidos/dcind


That being said, if you are simply trying to build a Docker image, you can use the docker-image-resource instead and just specify the Dockerfile.

edtan
  • 46
  • 4