Closed mcatanzaro closed 4 years ago
Interesting. Looks to be a podman doing the limiting.
$ docker run -it --rm debian:buster sh -c 'ulimit -Hn; ulimit -Sn'
1048576
1048576
$ podman run -it --rm debian:buster sh -c 'ulimit -Hn; ulimit -Sn'
1024
1024
Pass --ulimit=4096:4096
or something.
Anyways, the original issue stands. We use buster for most everything else. I don't know why ubuntu disco was chosen here.
Pass
--ulimit=4096:4096
or something.
Been a while. ;) Thanks for the hint!
Been a while. ;) Thanks for the hint!
Note: 4096 (my hard limit) isn't enough for a Debian Buster container. It ends in:
OSError: [Errno 24] Too many open files: '/root/.local/share/virtualenvs/src-Gb_cNZZO/bin/pip'
I will do try this the old-fashioned way. ;)
Fixed with #106.
Crazy that pip opens so many files without closing them during the transaction. Unfortunately, this seems like something you have to fix when launching the container runtime as discussed above or a bug in pip that I doubt we're going to track down here.
@mcatanzaro I tested it locally with both Docker and podman and both were able to successfully build the image. I'm closing this issue, but feel free to reopen it in case you have some new information or steps to reproduce.
The new Dockerfile works, thanks!
That said, it is a bit confusing to use, per my comment at https://github.com/endlessm/azafea-metrics-proxy/issues/12#issuecomment-620002365.
Yo. With EOL of Ubuntu 19.04, the Docker image no longer builds:
It seems Ubuntu deletes its update repos once a release hits EOL? That's pretty aggressive. Anyway, I tried upgrading to 19.10:
But that fails because it hits a file descriptor limit:
I tried increasing the soft fd limit:
That failed because both the hard and soft limits inside the container build are 1024. (Not sure why; my host machine has a higher hard limit, so podman must be lowering the limit itself.)
I tried increasing the hard limit as well:
That failed:
Not quite sure why I have permission to use apt but not ulimit. I don't know much about containers.
I tried upgrading to 20.04, since that seems like a good environment to target for the next couple years:
That failed due to dpkg repeatedly crashing. The focal image seems to be in real bad shape.
I gave up on Ubuntu and switched to Debian:
That got a lot farther than the other attempts, but eventually failed after installing pipenv:
I tried converting the dockerfile to use CentOS, but hit the 1024 fd limit there too. I even used
ulimit -H -n 4096
to raise the hard fd limit on my host to make sure that's not used to set the ulimit inside the container, but that had no effect. At this point, I think I'll give up on containers and try installing the old-fashioned way....