5. Run the Docker Container on the New Server π
Now, itβs time to run the Docker container using the image on the new server.
docker run -d --name <container-name> -p <host-port>:<container-port> <image-name>:<tag>
Example:
docker run -d --name myapp-container -p 8080:80 myapp:latest
Pro Tip: Donβt forget to map your ports correctly, ensuring your application is accessible from outside the container.