Unwanted ports bound when running a docker image #8709

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

Comments

Projects
None yet
6 participants
@mireianievas

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

This comment has been minimized.

Show comment
Hide comment
@gdm85

gdm85 Oct 22, 2014

Contributor

s/binded/bound/ pleeaase :)

I think there is no UNEXPOSE command

Contributor

gdm85 commented Oct 22, 2014

s/binded/bound/ pleeaase :)

I think there is no UNEXPOSE command

@mireianievas

This comment has been minimized.

Show comment
Hide comment
@mireianievas

mireianievas Oct 22, 2014

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?.

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 from Unwanted ports binded when running a docker image to Unwanted ports bound when running a docker image Oct 22, 2014

@codeon-nat

This comment has been minimized.

Show comment
Hide comment
@codeon-nat

codeon-nat Jan 8, 2015

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

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

This comment has been minimized.

Show comment
Hide comment
@AshleyAitken

AshleyAitken Jan 10, 2015

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

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

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Jan 10, 2015

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

Member

thaJeztah commented Jan 10, 2015

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

This comment has been minimized.

Show comment
Hide comment

Thank you @thaJeztah

@cpuguy83

This comment has been minimized.

Show comment
Hide comment
@cpuguy83

cpuguy83 Feb 21, 2015

Contributor

Closeing since it's really a dup for UNSET

Contributor

cpuguy83 commented Feb 21, 2015

Closeing since it's really a dup for UNSET

@cpuguy83 cpuguy83 closed this Feb 21, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment