cyberkernelofficial / docker-in-termux

This repository contains instructions on how to install Docker in Termux, without root.
MIT License
151 stars 17 forks source link

How to visit my web service running as a container inside alpine from Termux? #10

Open HenryLoveMiller opened 3 months ago

HenryLoveMiller commented 3 months ago

I successfully run Docker according to the excellent tutorial.

But I can not visit my web service runing as a container inside alpine, whose port is 5244.

cyberkernelofficial commented 3 months ago

In step 14, add this to your file:

#!/bin/bash qemu-system-x86_64 -machine q35 -m 1024 -smp cpus=2 -cpu qemu64 -drive if=pflash,format=raw,read-only=on,file=$PREFIX/share/qemu/edk2-x86_64-code.fd -netdev user,id=n1,dns=8.8.8.8,hostfwd=tcp::5244-:5244 -device virtio-net,netdev=n1 -nographic alpine.img

And while running your docker container, add this: -p 5244:5244

Now, you can access.

jiangmuran commented 1 month ago

How to add more ports?

cyberkernelofficial commented 1 month ago

try to use comma (,) example: -p 5244:5244,5234:5234