Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#69367 - [docker] Keeps bound port after container exited

Attached to Project: Community Packages
Opened by Iván Perdomo (katratxo) - Tuesday, 19 January 2021, 13:08 GMT
Last edited by Doug Newgard (Scimmia) - Wednesday, 20 January 2021, 12:14 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

Description:

The published ports to the host machine keep bounded (in-use) after the container has exited.
Restarting the service makes the problem go away.

Additional info:

* Package version: docker-1:20.10.2-3
* docker --version
Docker version 20.10.2, build 2291f610ae

Steps to reproduce:

Start a container publishing some port and then exit it

$ docker run --tty --interactive --rm --publish 3000:3000 alpine:3.12
/ # ^D (or exit)

Try to do the same operation, another container publishing the same port:

$ docker run --tty --interactive --rm --publish 3000:3000 alpine:3.12
docker: Error response from daemon: driver failed programming external connectivity on endpoint exciting_cray (f133e4a4f593120300b70fac45ab1bd31cef071232546a6f8091f8998c012e39): Bind for :::3000 failed: port is already allocated.

Restart the docker service

# systemcl restart docker

Now you can start again the container
$ docker run --tty --interactive --rm --publish 3000:3000 alpine:3.12
This task depends upon

Closed by  Doug Newgard (Scimmia)
Wednesday, 20 January 2021, 12:14 GMT
Reason for closing:  Fixed
Additional comments about closing:  docker 1:20.10.2-4
Comment by Jason Papakostas (vith) - Tuesday, 19 January 2021, 13:59 GMT
I am experiencing this as well.

Downgrading `docker` from `1:20.10.2-3` to `1:20.10.2-2` is working for me.
Comment by Martin Tibke (MTibke) - Wednesday, 20 January 2021, 11:15 GMT
I've the same issue here and it also went away after downgrading to the previous version.
Comment by Jason Papakostas (vith) - Wednesday, 20 January 2021, 11:42 GMT
@MTibke did you try `1:20.10.2-4`? The change that caused this was reverted[1]; I don't have a problem with the latest version now.

[1]: https://github.com/archlinux/svntogit-community/commit/7ad6147e8cbbadac39011ca9efb713598c8f33a6#diff-3e341d2d9c67be01819b25b25d5e53ea3cdf3a38d28846cda85a195eb9b7203a
Comment by Martin Tibke (MTibke) - Wednesday, 20 January 2021, 12:07 GMT
@Jason Papakostas I had the issue with version docker-1:20.10.2-3 and wasn't aware about the -4 update. After installing docker-1:20.10.2-4 I wasn't able to reproduce the issue.

Loading...