Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unwanted ports bound when running a docker image #8709

Closed
mireianievas opened this issue Oct 22, 2014 · 7 comments
Closed

Unwanted ports bound when running a docker image #8709

mireianievas opened this issue Oct 22, 2014 · 7 comments

Comments

@mireianievas
Copy link

Hi,

I've created a new repository by committing an existing (but not running) container to a new name (e.g. mysoft).

The problem is that when I run it as:

docker run -t -i mysoft /bin/bash

The ports that I used to bind to the older container / image by using the '-p' parameter are exposed in this new container.

Is this the expected behavior?. How can I get rid of it and run my new repo/image without exposing any of these older ports?.

Miguel

@gdm85
Copy link
Contributor

gdm85 commented Oct 22, 2014

s/binded/bound/ pleeaase :)

I think there is no UNEXPOSE command

@mireianievas
Copy link
Author

Arggggghhhh, what a mistake!. Sorry!

Mmm, so there's no way to easily reuse this image for another project I guess. Can it be done by exporting and importing again the container?.

@mireianievas mireianievas changed the title Unwanted ports binded when running a docker image Unwanted ports bound when running a docker image Oct 22, 2014
@codeon-nat
Copy link

UNEXPOSE would be nice to have. When I "inherit" from another container and change the port, the old one (here 9000/tcp) still shows up

1c4c9c9fdf08        mulle/mediawiki:wheezy   "/usr/sbin/php5-fpm    17 hours ago        Up 17 hours         **9000/tcp**, 172.17.42.1:9001->9001/tcp       mediawiki

@AshleyAitken
Copy link

I agree UNEXPOSE is needed, even UNEXPOSE ALL (or something to that effect).

@thaJeztah
Copy link
Member

See this issue #3465 (and PR #8177) for UNSET-ing properties inherited from a parent image.

I think this should be closed as a dup of #3465

@AshleyAitken
Copy link

Thank you @thaJeztah

@cpuguy83
Copy link
Member

Closeing since it's really a dup for UNSET

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants