运行 Docker compose build --no-cache

问题描述 投票:0回答:1

我想在 Ubuntu VM 上运行 Geonode,当我运行命令时

docker-compose build --no-cache

遵循本指南我遇到以下错误,我不知道如何解决它:

Dockerfile:3
1 | FROM nginx:1-alpine
2 |
3 | >>> RUN apk add --no-cache openssl inotify-tools
4 |
5 | WORKDIR /etc/nginx/
ERROR: failed to solve: process "/bin/sh -c apk add --no-cache openssl inotify-tools" did not complete successfully: exit code: 2
ERROR: Service 'geonode' failed to build : Build failed 
docker-compose dockerfile alpine-linux
1个回答
0
投票

您的容器似乎没有网络连接。

您可以测试(

ping
在构建期间)是否能够访问 Alpine Linux 服务器:

FROM nginx:1-alpine
RUN ping -c 3 dl-cdn.alpinelinux.org
RUN apk --update add --no-cache openssl inotify-tools
© www.soinside.com 2019 - 2024. All rights reserved.