I have tried to build the below Dockerfile, for the first time it built successfully but after that it is throwing the mentioned error. I am mentioning the Dockerfile and error below.
Dockerfile:
FROM alpine
RUN apk add --update redis
CMD ["redis-server"]
Error:
Sending build context to Docker daemon 2.048kB Step 1/3 : FROM alpine ---> e7d92cdc71fe Step 2/3 : RUN apk add --update redis ---> Running in c03f589ce9da fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.11/main: temporary error (try again later) WARNING: Ignoring APKINDEX.70f61090.tar.gz: No such file or directory fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.11/community: temporary error (try again later) WARNING: Ignoring APKINDEX.ca2fea5b.tar.gz: No such file or directory ERROR: unsatisfiable constraints: redis (missing): required by: world[redis] The command '/bin/sh -c apk add --update redis' returned a non-zero code: 1
temporary error (try again later)) ? Have you checked that you can successfully connect to the Internet, especially to dl-cdn.alpinelinux.org/alpine/v3.11/main ? By the way, there are official Redis images already available (for exampleredis:5.0.7-alpine), there should be no need to rebuild one. - norbjdFROM node:current-slim WORKDIR /usr/src/app COPY package.json . RUN npm install EXPOSE 8080 CMD [ "npm", "start" ] COPY . .But the error is : npm ERR! request to registry.npmjs.org/bootstrap failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-02-18T11_01_49_170Z-debug.log I am new to docker. - Sarang Gdocker run --rm -it alpine:3.11 ping alpinelinux.organd 2) run ping fromDockerfile(just addRUN ping alpinelinux.org). If this does not work, could you also try to ping the IP instead of the domain name and see what happen? - norbjdping: bad address 'alpinelinux.org'and for 2nd command the result wasSending build context to Docker daemon 2.048kB Step 1/2 : FROM ubuntu ---> ccc6e87d482b Step 2/2 : RUN ping alpinelinux.org ---> Running in f94af01d102a /bin/sh: 1: ping: not foundI am also unable to rundocker run busybox ping google.com- Sarang Gping alpinelinux.orgfrom your host for example)? - norbjd