I wonder if anyone could direct me in the right direction with this as I am totally new to this.

I have a question in regard to docker and containers - If I pull a container with php7.4 can I make it available across my installation of Ubuntu or do I have to stick to this container and work within the container?

What I am trying to do is have an Apache server running my website and Owncloud, and be both accessible over the internet. I can get both containers running with no bother but they aren't accessible from the internet (only localhost).

Then I was reading about traefik - spent a day playing with it and managed to set up both Apache and Owncloud but again I couldn't access them over the internet and also had issues with https. This is all very interesting and I know I have a lot to learn but when I open one door there are another 10 behind them and I am a bit lost.

  • You will want to look at using Apache on your as a proxy for the containers. This is generally the simpler way to accomplish the goal (rather than employ port forwarding) 👍🏻
    – matigo
    Commented Dec 13, 2022 at 0:27
  • Hey, care to give more information or a point to a website so I can read about it ? Commented Dec 13, 2022 at 1:01
  • 1
    As Matigo said, PHP has official Docker images build with Apache - see here. You would use the tag 7.4-apache. Commented Dec 14, 2022 at 7:17

1 Answer 1


The best way for you to run services locally and yet have them accessible on the internet ( having https too ) is to use Cloudflare tunnel for the specific service. All you have to do, once you have Cloudflare account is to go to Zero Trust, click Access->Tunnels, create a tunnel, select Docker for Connector, and then copy and run it in your local env where your service is running. After that configure the tunnel in Cloudflare panel to match your port on your localhost where the service is running. Much, much simpler and more secure then running Traefik and configuring the router to accept the traffic from the outside.

For Docker and Apache php part, there is a php:7.4-apache image on Docker Hub, which you can use, but it has number of vulnerabilities. You could also start with Ubuntu or Alpine image and then add packages that you need in your Dockerfile.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .