/bin/sh: curl: not found

I use the following config:

    version: 2.0
    jobs:
      build:
        working_directory: ~/app
        docker:
          - image: docker:17.06.1-ce-git
          - image: circleci/node:7.10.0
          - image: circleci/postgres:9.6-alpine
        steps:
          - checkout
          - setup_remote_docker
          - run:
              name: Install Docker Compose
              command: |
                set -x
                curl -L https://github.com/docker/compose/releases/download/1.11.2/docker-compose-`uname -s`-`uname -m` > ~/docker-compose
                chmod +x ~/docker-compose
                sudo mv ~/docker-compose /usr/local/bin/docker-compose
          - run: docker-compose build
          - run: docker-compose run -e DEBUG=* --rm app test

Yet I receiveve
`+ uname -s

We’re using Ubuntu 14.04. Any ideas on what might be wrong?

1 Like

I ran into this problem today with jobs.build.docker.image docker, exactly the same as you.

It’s poorly documented and no one reply on the forum… sad…

One of the things I have learned from helping at Stack Overflow (and I say that as someone who helps 90% of the time and seeks help 10% of the time) is that sad-face-begging is counterproductive. Readers, rightly or wrongly, will read that either as blame or blackmail, neither of which is a productive way to ask for assistance.

So, what I would suggest is:

  • put on your positive thinking hat
  • explain something about your use case (if only because “+1 me too fix it for me” is not likely to encourage replies)
  • remember that CI is hard, and requires some familiarity with console commands, permissions, installing things, etc.

Your base image is docker:17.06.1-ce-git, and I assume that’s based on Ubuntu. If so, I imagine it would have curl installed, but maybe not. Have you tried installing curl in the usual way, prior to trying to use it?

1 Like

Hi @halfer,

Thank you for the reply and your suggestion for the community is great.

I showed a sad-face-begging because the document really needs to improve, I invested lots of time to get to work with CircleCI 2.0 docker mode.

At first, I thought the image should be based on Ubuntu as you, however, at last, I get to know that the docker:17.06.1-ce-git is based on Alpine after serval times of failure and blind working.

So I use apk update && apk add curl curl-dev bash to get my curl, the problem solved.

Sure, I understand that you believe that. But I helped you despite your question, not because of it. We won’t know how many people skipped your question for the reasons I outlined (and to be fair, this forum is pretty quiet anyway) but my advice stands. Exuding a positive frame of mind encourages people to help.

Good work :smiley: