Comments (9)
It's because the web server listens on port 80 and 443 by default. Change it if you use different port numbers.
from baseimage-docker.
Is there any webserver in the baseimage ?
Aren't those ports only required to be exposed on the passenger-docker image ?
from baseimage-docker.
Oh, oops, I see what you mean now.
from baseimage-docker.
Actually, now that I've re-read the documentation, I think in baseimage-docker even port 22 should not be exposed. EXPOSE used to be used for exposing ports for port forwarding, but somewhere in 0.6 or 0.7 they changed it, and now EXPOSE is for exposing ports for use in linking. I will remove all EXPOSE entries.
from baseimage-docker.
I did not know that. Thank you for sharing 👍
from baseimage-docker.
Whats is the point of starting sshd in the container if the port to access it (22) is not exposed?
from baseimage-docker.
So that you can perform administration tasks.
Note that exposing the port is not required to be able to access the port. Exposing the port merely means that when you link the container to another container, that the port information is passed to that container. Whether a port is exposed or not, you can still access it through the container's private IP.
from baseimage-docker.
Indeed, it is accessible. Good to know, thanks.
It is not straight-forward to access a service when the port is not exposed, and it can be accessed only through the IP address of the container. So such access feels like a back door.
I am not saying it is wrong. It works, and if it is well documented then it is OK.
from baseimage-docker.
You are thinking about port forwarding. That is unrelated to exposing ports in the Dockerfile. As I mentioned before, exposing is only for use in linking containers. If you want to forward a port to the host then invoke 'docker run' with the right '-p' arguments.
from baseimage-docker.
Related Issues (20)
- You should probably simply the docs to show the memcached example very early on HOT 3
- We now have a Discord server!
- Changelog for `focal-1.1.0` HOT 3
- hi. rocky8 or centos8 not support? HOT 3
- Change container builder from Docker to Buildah/Podman HOT 5
- There is a missing tag for focal-1.1.0 HOT 5
- pull error HOT 3
- Is the version of 0.10.2 alreadly outdated..? HOT 2
- apt does not work HOT 7
- syslog-ng warning HOT 2
- User inside the container HOT 9
- Timezone change HOT 2
- The docker pull command on the hub.docker.com page doesn't work HOT 1
- Security vulnerabilities HOT 6
- Docker Hub and Free Team Organisations HOT 1
- Base on Ubuntu 22.04 LTS? HOT 1
- Where did the MASTER tag go?
- package architecture (amd64) does not match system (arm64) on Macbook M2 HOT 1
- how to enable sshd in baseimage? HOT 2
- Status of jammy-1.0.2 build HOT 5
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 baseimage-docker.