concourse / concourse-docker

Offical concourse/concourse Docker image.
Apache License 2.0
241 stars 152 forks source link

Quickstart with docker-compose not working #31

Closed ITler closed 5 years ago

ITler commented 5 years ago

Seeing this issue when trying out concourse via docker-compose from Quick Start and then proceeding with first task from Hello World Tutorial

I run on High Sierra and user docker-machine for my docker environment.

$ fly -t tutorial execute -c task_hello_world.yml
executing build 1 at http://192.168.99.101:8080/builds/1
initializing
iptables: create-instance-chains: iptables: No chain/target/match by that name.

Environment

MacOS High Sierra with docker-machine

docker-machine version 0.16.0, build 702c267 (should be most recent)

boot2docker VM by docker-machine

iptables v1.4.21
Linux default 4.14.79-boot2docker #1 SMP Thu Nov 8 01:56:42 UTC 2018 x86_64 GNU/Linux

Docker:

Client: Docker Engine - Community
Version:           18.09.0
API version:       1.39
Go version:        go1.11.2
Git commit:        4d60db4
Built:             Wed Dec 12 13:12:25 2018
OS/Arch:           darwin/amd64
Experimental:      false

Server: Docker Engine - Community
Engine:
  Version:          18.09.0
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       4d60db4
  Built:            Wed Nov  7 00:52:55 2018
  OS/Arch:          linux/amd64
  Experimental:     false

docker-compose

docker-compose version 1.23.2, build 1110ad0
docker-py version: 3.6.0
CPython version: 2.7.15
OpenSSL version: OpenSSL 1.0.2q  20 Nov 2018

Excerpt from docker-compose log concourse

{
    "data": {
        "argv": [
            "/worker-state/4.2.2/assets/iptables/sbin/iptables",
            "--wait",
            "--table",
            "nat",
            "-A",
            "w--prerouting",
            "--jump",
            "w--instance-t8vmr0jgube",
            "-m",
            "comment",
            "--comment",
            "1a6fadf7-9954-43e1-4bb1-96b29f1e4976"
        ],
        "error": "exit status 1",
        "exit-status": 1,
        "session": "1.2",
        "stderr": "iptables: No chain/target/match by that name.\n",
        "stdout": "",
        "took": "3.139223ms"
    },
    "log_level": 2,
    "message": "guardian.iptables-runner.command.failed",
    "source": "guardian",
    "timestamp": "1546176981.191809177"
}

docker-compose.yml

version: '3'
services:
  concourse-db:
    image: postgres
    environment:
    - POSTGRES_DB=concourse
    - POSTGRES_PASSWORD=concourse_pass
    - POSTGRES_USER=concourse_user
    - PGDATA=/database

  concourse:
    image: concourse/concourse
    command: quickstart
    privileged: true
    depends_on: [concourse-db]
    ports: ["8080:8080"]
    environment:
    - CONCOURSE_POSTGRES_HOST=concourse-db
    - CONCOURSE_POSTGRES_USER=concourse_user
    - CONCOURSE_POSTGRES_PASSWORD=concourse_pass
    - CONCOURSE_POSTGRES_DATABASE=concourse
    - CONCOURSE_EXTERNAL_URL=http://${MY_DOCKER_HOST_IP}:8080
    - CONCOURSE_ADD_LOCAL_USER=test:REDACTED
    - CONCOURSE_MAIN_TEAM_ALLOW_ALL_USERS=true
    - CONCOURSE_WORKER_GARDEN_NETWORK

If I would need to guess, this is an issue with iptables version used in boot2docker

larssb commented 5 years ago

HI @ITler,

I know this is not directly solving the issue you have. However, if I was you I would run it via docker-compose directly. By using "Docker Desktop for MacOS". I have it working on my MacOS (I'm on MacOS Mojave).

I hope that helps you.

ITler commented 5 years ago

For this particular case, this is totally fine. Thanks @larssb for pointing that out... Was time to upgrade my dev environment.

Cheers