Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

This tutorial shows how to run a webserver with docker.

Firstly create a VM - the instructions here are based on our ScientificLinux-7-NoGui image.

SSH to your VM and install docker:

sudo yum install docker-ce -y

Start and enable dockered

sudo systemctl enable docker && sudo systemctl start docker

Check that you are using our dockerhub mirror as described here: STFC Docker Hub Mirror

Pull the docker image for the nginx webserver

sudo docker pull nginx

Run the nginx docker container:

sudo docker run -it --rm -d -p 80:80 --name nginx nginx

Check that the container is running

sudo docker ps

You should see the nginx container running

You should now be able to browse to your webserver at the http://<instance-ip>

If this doesn't work check the security group for your instance

  • No labels