创建Docker镜像失败,因为我没有在CircleCi环境下安装Docker客户端。
官方CircleCi文档只提供了install Docker Client的Go版本,但我的项目是使用jdk-14.0.2构建的
下面是我的config.yml文件示例:
version: 2.1
jobs:
build:
docker:
- image: openjdk:14.0.2-jdk-slim
# make working directory on circleCI
working_directory: ~/upload-image
steps:
# git pull
- checkout
# setup testing env
- setup_remote_docker:
version: 19.03.13
docker_layer_caching: true
### I believe I should install docker-cli here via jdk not via apk, but I don't know how to ###
# - run:
# name: Install Docker client
# command: apk add docker-cli
# the error occurs at this step since the docker-cli is not installed
- run:
name: doese Docker Exist
command: docker -v发布于 2020-11-05 07:23:14
这个问题解决了,需要在环境中安装docker cli。或者,简单的方法是使用预先安装了docker cli的语言镜像,例如:- image: cimg/openjdk:14.0
https://stackoverflow.com/questions/64668633
复制相似问题