Comments (56)
try to add
RUN echo "ipv6" >> /etc/modules
in your dockerfile before apk update, Its working for me, I'm going to do a pull request if it fixes it for somebody else
from docker-alpine.
@rayyen @Skarlso @oryband ran into the same problem, my solution is simply add --no-cache
flag and that works like a charm
from docker-alpine.
Nevermind I found that I need to specify :
echo "http://dl-2.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories; \
echo "http://dl-3.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories; \
echo "http://dl-4.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories; \
echo "http://dl-5.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
from docker-alpine.
@dhruvasagar Does this still the only solution?? I'm trying to use 3.9.4
(right now it's the "latest" from Alpine) and can't install chsh
nor usermod
- but I can install openssh
without any issue 🤔
Already tried downgrading all the way down to 3.4
but still getting this error no matter what:
# apk add --no-cache chsh
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
chsh (missing):
required by: world[chsh]
#
Same for usermod
.
from docker-alpine.
Had the same problem. It wasn't a problem with alpine at all. I just simply had to restart my virtual machine as I have changed my wifi to a different one. Silly but might help someone.
from docker-alpine.
@jckimble: I created this issue on July 26 2015. The issue, as I discovered, was simply that the alpine base image (not just gliderlabs' -- but the base alpine:3.2 image) only contains the dl-3 and dl-4 repositories.
On the day that I reported the issue, at the time I reported it, dl-3 and dl-4 were both failing to respond, causing apk update/add commands to hang until failure. I edited the post on the next day, July 27 2015, and noted that dl-3 and dl-4 were back online.
I'm leaving leaving this issue open, and not not self-closing closing it, for two reasons.
- So that others who may run into the same issue can understand why it is occurring and how to resolve it, and
- So that gliderlabs may decide to add 1,2, and 5 as sources to their image so that this issue can be better mitigated.
from docker-alpine.
@mishak87 Seeing this too
from docker-alpine.
I just changed the order of main and community repos, so the resulting the /etc/apk/repositories file looks like as following:
http://dl-cdn.alpinelinux.org/alpine/v3.4/community
http://dl-cdn.alpinelinux.org/alpine/v3.4/main
And it worked. If the "main" repo was in the first line of repositories file even waiting for 30 seconds with "apk update --wait 30" didn't resolve the issue. Maybe not a solution, but might help to someone.
from docker-alpine.
dint Under stand the root cause of the issue
from docker-alpine.
Missing settings for the DNS-Server in docker was in my case the cause of this error:
I added the dns-servers into /etc/docker/daemon.json
{ "dns": [own_dns,"8.8.8.8","8.8.8.4"] }
service docker restart
And then it worked.
from docker-alpine.
Hello,
I post here because what I am seeing is exactly what was originally posted here (not in the other issues). In my Dockerfile I have :
FROM alpine:3.2
ADD repositories /etc/apk/repositories
RUN apk --update add nginx
And it has been 2 days I get the following errors :
Step 1 : FROM alpine:3.2
---> 5f36db706cc4
Step 2 : ADD repositories /etc/apk/repositories
---> dde067180c33
Step 3 : RUN apk --update add nginx
---> Running in 94322b25a762
fetch http://dl-1.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-1.alpinelinux.org/alpine/v3.2/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.e10619d8.tar.gz: No such file or directory
fetch http://dl-2.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-2.alpinelinux.org/alpine/v3.2/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.72be7668.tar.gz: No such file or directory
fetch http://dl-3.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-3.alpinelinux.org/alpine/v3.2/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.2f76b101.tar.gz: No such file or directory
fetch http://dl-4.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-4.alpinelinux.org/alpine/v3.2/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.abd86498.tar.gz: No such file or directory
fetch http://dl-5.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-5.alpinelinux.org/alpine/v3.2/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.d195cb40.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
nginx (missing):
required by: world[nginx]
The command '/bin/sh -c apk --update add nginx' returned a non-zero code: 1
I can ping totally fine both repositories from the virtualbox VM where I run the build command..
from docker-alpine.
Just a docker pull
worked. My image was too old...
from docker-alpine.
@andyshinn I added dl-1 through dl-5 in order; that is to say:
http://dl-1.alpinelinux.org/alpine/v3.2/main
http://dl-2.alpinelinux.org/alpine/v3.2/main
http://dl-3.alpinelinux.org/alpine/v3.2/main
http://dl-4.alpinelinux.org/alpine/v3.2/main
http://dl-5.alpinelinux.org/alpine/v3.2/main
When it got to dl-3
, it hung for a while, errored out, and then moved to dl-4
, which hung, errored, and moved to dl-5
. The above is what I put as my sources in images based on alpine:3.2
(the official release), and I haven't had issues yet. This leads me to the conclusion that as long as one of the repositories listed in /etc/apk/repositories
is up, the user should be able to run apk commands successfully.
Also, you said that "This is definitely related to #55" -- this is #55. Was that a mistake?
from docker-alpine.
Hello,
First thanks again for your fast answers.
I managed to figured it out. Usually I provision my servers with ansible and I have a ferm role to configure iptables. The server I was trying to build the image on is not supposed to be a server in the cloud, more a server on my local network where I create tunnel to access specific services.
As I was not applying the ferm role, I totally forgot I had set in /etc/default/docker the --iptables=false parameter, thus resulting not having the masquerade rule and all other docker container rules (moby/moby#13381)
I am building the image now totally fine. Sorry to made you lose some time on this..
Have a good week end.
Cheers
from docker-alpine.
I'm getting this error with rkt
from docker-alpine.
@jasetom 's solution is wonderfully correct.... just 'service docker restart' the problem solved...what the f*ck... but what if the docker is running in non-root mode.... can't tell the admin to restart....too shame... hope the next version of docker is more stable then
from docker-alpine.
@wanjochan, @jasetom: https://docs.docker.com/v1.8/articles/networking/
from docker-alpine.
I fixed this issue by adding --dns 8.8.8.8 --dns 8.8.4.4
to my DOCKER_OPTS
in /etc/default/docker
and restarting docker.
from docker-alpine.
It was the corporate proxy in my case :/
from docker-alpine.
@jckimble as i noted, it was due to the repositories literally being offline.
from docker-alpine.
oh sorry, I was using dl-4 earlier today and that fixed it for me, I guess it came back up between yesterday and today
from docker-alpine.
When you fixed the problem by adding additional repositories, did you add them under dl-4 and observe that dl-4 would fail and then go to the next repository? This is definitely related to #55 and I think we will get a couple more repositories to the list. But I've had mixed reports of how it actually fails over and want to understand it a bit more first.
from docker-alpine.
My experience is that a timeout does not fail over.
from docker-alpine.
Yup, I have the same problem as @tilgovi, for us it doesn't fail over, apk just sits there for however long it takes me to get pissed off and kill it to test it locally, I've never even got a timeout error from apk.
from docker-alpine.
I've seen evidence around that apk does use multiple mirrors when they are defined. I've also observed that if I put in something that's totally not right that apk will ignore the "bad" mirror.
I can't remember the exact message I saw, but at the time things were very intermittent and slow from dl-4. Individual packages would timeout, sometimes mid-download, and then apk would not retry with a different mirror. That may be an issue for upstream, but in the meantime I suspect that doing something to address the reliability would help us here a lot.
from docker-alpine.
Right, this has been my experience as well and is why I'm not jumping to add more mirrors to the list. I'd rather learn more about what we expect behavior to be so I can open an issue upstream. It's also possible that it is supposed to failover or timeout on bad network / packet loss but is just a bug.
And yes, I meant that this is related to #61 (and probably #66 as well) 😛.
I'm going to close this in favor of #61, #66, and #4. It seems like this issue is a mix of fixes from those pull requests. Feel free to comment in those and /or re-open this if I am missing something here.
from docker-alpine.
I have same problem to install https://pkgs.alpinelinux.org/package/community/x86_64/go
FROM alpine:edge
MAINTAINER PubNative Team <[email protected]>
RUN echo "ipv6" >> /etc/modules
RUN echo "http://dl-1.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories; \
echo "http://dl-2.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories; \
echo "http://dl-3.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories; \
echo "http://dl-4.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories; \
echo "http://dl-5.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories
$ docker run -it go sh
/ # apk update
fetch http://dl-4.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-1.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-2.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-3.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-5.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
v3.3.0_rc1-143-gdad8488 [http://dl-4.alpinelinux.org/alpine/edge/main]
v3.3.0_rc1-140-g1fe0ee3 [http://dl-1.alpinelinux.org/alpine/edge/main]
v3.3.0_rc1-3-gbd9bf58 [http://dl-2.alpinelinux.org/alpine/edge/main]
v3.3.0_rc1-143-gdad8488 [http://dl-3.alpinelinux.org/alpine/edge/main]
v3.3.0_rc1-143-gdad8488 [http://dl-5.alpinelinux.org/alpine/edge/main]
OK: 5732 distinct packages available
/ # apk add go
ERROR: unsatisfiable constraints:
go (missing):
required by: world[go]
from docker-alpine.
@miry yes, your issue was simply the repositories being incorrect -- glad you got that figured out!
@trompx can you post the contents of your local repositories
file that you're adding to /etc/apk/repositories
?
from docker-alpine.
Hello @bddenhartog,
Really sorry for the delayed answer, I've been very busy and I completly forgot about it.
So in my repositories file I had :
http://dl-1.alpinelinux.org/alpine/v3.2/main
http://dl-2.alpinelinux.org/alpine/v3.2/main
http://dl-3.alpinelinux.org/alpine/v3.2/main
http://dl-4.alpinelinux.org/alpine/v3.2/main
http://dl-5.alpinelinux.org/alpine/v3.2/main
I then tried with the following as miry suggested but still getting the same error
http://dl-1.alpinelinux.org/alpine/edge/community
http://dl-2.alpinelinux.org/alpine/edge/community
http://dl-3.alpinelinux.org/alpine/edge/community
http://dl-4.alpinelinux.org/alpine/edge/community
http://dl-5.alpinelinux.org/alpine/edge/community
Then I tried the exact same config as miry with alpine edge but still no luck.
I just tried with the new alpine:3.3 with
FROM gliderlabs/alpine:3.3
RUN apk --update add nginx
but I am still getting :
Step 1 : FROM gliderlabs/alpine:3.3
3.3: Pulling from gliderlabs/alpine
24e7cde1dbe9: Pulling fs layer
24e7cde1dbe9: Verifying Checksum
24e7cde1dbe9: Download complete
24e7cde1dbe9: Pull complete
Digest: sha256:5b01e1909959a792afc873c0b18a03658e38d81456a9c2ac79fd0fd2c48645f6
Status: Downloaded newer image for gliderlabs/alpine:3.3
---> 24e7cde1dbe9
Step 2 : RUN apk --update add nginx
---> Running in 1701191a8cb1
fetch http://alpine.gliderlabs.com/alpine/v3.3/main/x86_64/APKINDEX.tar.gz
ERROR: http://alpine.gliderlabs.com/alpine/v3.3/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.207234d0.tar.gz: No such file or directory
fetch http://alpine.gliderlabs.com/alpine/v3.3/community/x86_64/APKINDEX.tar.gz
ERROR: http://alpine.gliderlabs.com/alpine/v3.3/community: temporary error (try again later)
WARNING: Ignoring APKINDEX.231b5af5.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
nginx (missing):
required by: world[nginx]
from docker-alpine.
Can you try to open or curl http://alpine.gliderlabs.com/alpine/v3.3/main/ on the host having the issue? What does the host setup look like?
from docker-alpine.
I can curl the url totally fine.
The host is a ubuntu 14.04 desktop (but I had the same problem previously on a Vagrant VM with ubuntu 14.04 server).
Docker version : 1.9.1
Edit : I think I must have some dns problem with docker, I can ping alpine.gliderlabs.com from the host but not inside the gliderlabs/alpine:3.3 container resulting in a "ping: bad address 'alpine.gliderlabs.com'". I will investigate more tommorrow, need some serious sleep ..
from docker-alpine.
@trompx, since you're using alpine v3.3, here is what your /etc/apk/repositories
file should look like:
http://dl-1.alpinelinux.org/alpine/v3.3/main
http://dl-2.alpinelinux.org/alpine/v3.3/main
http://dl-3.alpinelinux.org/alpine/v3.3/main
http://dl-4.alpinelinux.org/alpine/v3.3/main
http://dl-5.alpinelinux.org/alpine/v3.3/main
Note the version number in the second to last section of the URL. That's important, and you'll want to ensure that the version number always matches the version of alpine you are trying to use.
Let me know how that works for you. If it doesn't resolve your issue, please paste the contents of your Dockerfile
(and all related files, like repositories
) in a Gist and link to that in a comment here. Thanks!
from docker-alpine.
If they happen to be running Docker inside VirtualBox on Mac then they are likely running into the DNS proxy issue. See if boot2docker/boot2docker#451 (comment) sounds like your issue.
from docker-alpine.
@andyshinn I just saw the edit @trompx's comment; that makes a lot of sense. Good catch!
from docker-alpine.
When you got the following error
WARNING: Ignoring APKINDEX.xxxx.tar.gz: No such file or directory
then there's a default note in the Alpine Linux wiki:
If you get WARNING: Ignoring APKINDEX.xxxx.tar.gz: No such file or directory while running package related tools, check your /etc/apk/repositories file if an entry points to .../v2.4/testing/. This directory is gone.
To check the content of the repositories file
cat /etc/apk/repositories
or
setup-apkrepos
When you take a look at the Gliderlabs Alpine Base Repo documentation here, then you will find exactly the same line as written above:
apk --update packagename
In case you want to add package repos, make sure you are not running on edge
as those seem to be often behind, especially when you use community
packages. Protip: Always go with …/latest-stable
, instead of a repository url like v3.5
(when you are building upon alpine:latest
), to make sure that your package repos are moving along without the need for updates and maintainence.
from docker-alpine.
The same error can be the result of this docker issue:
moby/moby#13381
from docker-alpine.
This may or may not be related but I was getting this error when running docker on my Raspberry pi 3 and it turns out uverse was blocking my outgoing connection to the repo because "router behind router" protection was enabled on my gateway.
from docker-alpine.
I just got same error. Repository changed to from http://dl-4.alpinelinux.org/
to http://dl-cdn.alpinelinux.org/
. (image alpine:3.3)
Why isn't old DNS record pointed to new location?
from docker-alpine.
this issue is back
from docker-alpine.
Why isn't Alpine linux's own repository in the repositories file? 😨
Adding this into the repositories worked for most of the stuff for me:
http://dl-5.alpinelinux.org/alpine/v3.3/main/
http://dl-6.alpinelinux.org/alpine/v3.3/main/
Still can't install iptables though.
from docker-alpine.
I am suffering this issue with v3.4.Tried everything mentioned here,however, the only thing I can do is to download the packages I need and install it manually.
from docker-alpine.
Also an interesting nitpick is, that the doc says that the repository URL should point to the APK_INDEX.tar.gz, where as in reality, it's pointing to the main folder and x86_64 will be autoappended.
from docker-alpine.
@Ehekatl , your solution works great ! thanks
alpine:/home/ray/laradock#` apk add docker --no-cache
fetch http://dl-4.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
fetch http://dl-6.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
OK: 444 MiB in 61 packages
from docker-alpine.
I just reboot ,it is solved. 😎
from docker-alpine.
this configuration works well for me:
RUN echo "http://dl-cdn.alpinelinux.org/alpine/v3.4/community" >> /etc/apk/repositories;
echo "http://dl-cdn.alpinelinux.org/alpine/v3.4/main" >> /etc/apk/repositories
from docker-alpine.
Found that networking was down. Started it with:
service networking restart
from docker-alpine.
I had this error. It was due to some invalid invisible characters
RUN apk add --no-cache --virtual build-deps \
make \
perl \ # <--- Non-space character in this line caused the error
gcc \
g++ \
git
...
Bleh.
from docker-alpine.
Just fixed my issue by disabling my running openvpn instance. It seems to create a conflict with docker containers.
sudo service openvpn stop
Regards
from docker-alpine.
- Just using mirrors.ustc.edu.cn
- install python like this: apk add --no-cache --virtual .build-deps python
- details as follows:
/usr/src/app # cat /etc/apk/repositories http://mirrors.ustc.edu.cn/alpine/v3.4/main http://mirrors.ustc.edu.cn/alpine/v3.4/community /usr/src/app # apk add --no-cache --virtual .build-deps python fetch http://mirrors.ustc.edu.cn/alpine/v3.4/main/x86_64/APKINDEX.tar.gz fetch http://mirrors.ustc.edu.cn/alpine/v3.4/community/x86_64/APKINDEX.tar.gz (1/9) Installing libbz2 (1.0.6-r5) (2/9) Installing libffi (3.2.1-r2) (3/9) Installing gdbm (1.11-r1) (4/9) Installing ncurses-terminfo-base (6.0_p20171125-r0) (5/9) Installing ncurses-terminfo (6.0_p20171125-r0) (6/9) Installing ncurses-libs (6.0_p20171125-r0) (7/9) Installing readline (6.3.008-r4) (8/9) Installing sqlite-libs (3.13.0-r1) (9/9) Installing python (2.7.14-r0) Executing busybox-1.24.2-r13.trigger OK: 76 MiB in 31 packages
from docker-alpine.
I had this issue using alpine:latest
and trying to install openssh-client
, using alpine:3.4
resolved it, didn't test with other repos, used 3.4 because that is what is in the example in readme. Didn't have to update repository sources.
from docker-alpine.
I am facing this as well, some of the packages seem to fail to be installed and throw a Protocol Error
on latest alpine, I tested and I notice that on alpine 3.7 it works fine for me however 3.8 and later give me this error. I tried playing around with changing dns, restarting docker (I am using docker for mac) and even factory reset my docker environment but none of those seem to help. Oddly however, I noticed that within my CI environment I did not face this issue, so it's something rather strange and I am unable to determine the root cause.
from docker-alpine.
I am aslo new to alpine image I am facing this as well
my cat /etc/apk/repositories file contents are as below
http://dl-cdn.alpinelinux.org/alpine/v3.9/main
http://dl-cdn.alpinelinux.org/alpine/v3.9/community
alpine version is 3.9.3
can someone please suggest some solution
Thanks
from docker-alpine.
@vkkothawale As of now the only solution I found was to downgrade to alpine version 3.4
from docker-alpine.
I've been scratching my head all day because of this problem. Turns out it was a rookie mistake, but thought I'd add my solution to the list in case it helps anyone...
I was getting:
`ERROR: unsatisfiable constraints:
py3-twisted (missing):
required by: world[py3-twisted]`
(py3-twisted is a new addition to Alpine 3.10)
In my dockerfile I was using FROM alpine:latest and expecting it to build from Alpine 3.10.
Thing is, Alpine:latest in my local image list was only 3.9.
docker pull alpine:latest upgraded the local alpine:latest to version 3.10 and it worked after that.
from docker-alpine.
FROM alpine:3.7
RUN apk --update add tmux
I'm constantly getting this error, even just for apk --update, I've tried change version to
FROM alpine:3.10 does the same error :(
Step 9/13 : RUN apk --update add tmux
---> Running in bac04c27db8f
/bin/sh: 1: apk: not found
The command '/bin/sh -c apk --update add tmux' returned a non-zero code: 127
from docker-alpine.
I was having this issue because I had "iptables":false
option set in /etc/docker/daemon.json
. Removed it, restarted docker, and the build worked as expected.
from docker-alpine.
Related Issues (20)
- gliderlabs.com does not hav a valid DNS, so docker builds with thie base image fail HOT 2
- Require image for ARM64 architecture HOT 1
- Issue in minikube docker --> ERROR: http://nl.alpinelinux.org/alpine/v3.5/main: DNS lookup error HOT 1
- Time zone is really necessary?
- Issues with wget/apk in alpine:3.13.0 and up
- dl-cdn.alpinelinux.org was offline (12:18:56am Tuesday, 15 February 2022 gmt ~ 2:52:10am Tuesday, 15 February 2022) HOT 27
- Error 503 Backend is unhealthy HOT 12
- ERROR: unable to select packages: curl (no such package): required by: world[curl] Cleaning up file based variables HOT 1
- apk updates are failing 3.15,3.17 - ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.17/main: temporary error (try again later) HOT 1
- Package Manager Broken (apk update: temporary error) HOT 1
- Some guide for install docker alpine on android device HOT 1
- Issues accessing https://dl-cdn.alpinelinux.org HOT 3
- Build mono fail in docker alpine with Segmentation fault
- My
- Slow internet, bad signature errors
- ccccccjtgkneuknjkdtekjjnhnhhivnbehlhjcudfejr HOT 1
- Nslookup doesn't work in github actions HOT 2
- dcps
- alpine:latest can't use hostname to find a server.
- building docker compose in VM Ubuntu
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-alpine.