Sample in https://circleci.com/docs/2.0/building-docker-images/, it mentioned
# use a primary image that already has Docker (recommended)
??? Then where are the sample codes?
But how? Why not give the sample codes directly and let us to guess?
After that, it gives sample to install docker each time, that’s weird document.
version: 2
jobs:
build:
docker:
- image: golang:1.6.4-jessie # (1)
working_directory: /go/src/github.com/CircleCI-Public/circleci-demo-docker
steps:
- checkout
# ... steps for building/testing app ...
- setup_remote_docker: # (2)
docker_layer_caching: true # (3)
# use a primary image that already has Docker (recommended)
# or install it during a build like we do here
- run:
name: Install Docker client
command: |
set -x
VER="17.03.0-ce"
curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
mv /tmp/docker/* /usr/bin