docker-compose build fails because of missing apk
jmatsuzawa opened this issue · 4 comments
jmatsuzawa commented
Problem
docker-compose build
fails at RUN apk add --no-cache --virtual .dl-deps curl
.
It seems that apk
is not found on weseek/growi:4.
Environment
- Ubuntu 20.04 on WSL2 on Windows 10 Pro
- Docker Desktop for Windows
Log
$ docker-compose build
mongo uses an image, skipping
Building elasticsearch
[+] Building 0.8s (7/7) FINISHED => [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 38B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.elastic.co/elasticsearch/elasticsearch:6.8.10 0.7s
=> [1/3] FROM docker.elastic.co/elasticsearch/elasticsearch:6.8.10@sha256:f8e21f6b2ef75dcda374da505fcb0ff4bf7e8d025f12096c498123fa4e372c1b 0.0s
=> CACHED [2/3] RUN bin/elasticsearch-plugin install analysis-kuromoji 0.0s
=> CACHED [3/3] RUN bin/elasticsearch-plugin install analysis-icu 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:219ee1cfc15f6cf1486fa05053af833cd0b4d6eaed3cbc3d448891dcdee8cff7 0.0s
=> => naming to docker.io/library/growi-docker-compose_elasticsearch 0.0s
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
Building app
[+] Building 0.5s (5/6) => [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 38B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/weseek/growi:4 0.0s
=> CACHED [1/3] FROM docker.io/weseek/growi:4 0.0s
=> ERROR [2/3] RUN apk add --no-cache --virtual .dl-deps curl && curl -sL https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-alpine-linux-amd64-v0.6.1.tar.gz | tar -xz -C /usr/local/bin && apk del .dl-deps 0.4s
------
> [2/3] RUN apk add --no-cache --virtual .dl-deps curl && curl -sL https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-alpine-linux-amd64-v0.6.1.tar.gz | tar -xz -C /usr/local/bin && apk del .dl-deps:
#5 0.327 /bin/sh: 1: apk: not found
------
executor failed running [/bin/sh -c apk add --no-cache --virtual .dl-deps curl && curl -sL https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz | tar -xz -C /usr/local/bin && apk del .dl-deps]: exit code: 127
ERROR: Service 'app' failed to build : Build failed
kometchtech commented
I am experiencing the same problem.
Environment
- Ubuntu 20.04.2 LTS
- docker 20.10.7
kim2039 commented
The latest version of weseek/growi may occur this problem.
When I changed the line of Dockerfile, it worked.
FROM weseek/growi:4
to
FROM weseek/growi:4.2.21
I-himawari commented
I edited Dockerfile, it worked.
RUN apk add --no-cache --virtual .dl-deps curl \
&& curl -sL https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
| tar -xz -C /usr/local/bin \
&& apk del .dl-deps
to
RUN apt-get update
RUN apt-get install -y curl
RUN curl -sL https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
| tar -xz -C /usr/local/bin
yuki-takei commented
Everyone,
The base OS of GROWI v4.3.x or later had changed to Ubuntu from Alpine.
So I was modified Dockerfile in July 23 2021. Please use it.