Scenarioo Docker Image
Creating a Docker image means to create a ready-to-run-artifact. This includes setting up the infrastructure, installing the Scenarioo war file and configuring the webapp. This process can be made manually or can be registered as a task on your CI.
Prerequisite: You need to have docker installed on your machine. On Ubuntu this can be done by running
sudo apt-get install docker.io.
- You find the necessary Dockerfile in the directory docker.
- Locate the scenarioo.war you want to deploy
- Assure that the Dockerfile and the scenarioo.war are located in the same directory. The names of the file have to be exactly as described.
- Open a bash and navigate to the directory which contains the files
- Now run the following command:
sudo docker build -t scenarioo/webapp:x.y.z .where
x.y.zstands for the Scenarioo version. build is the docker command and the -t options allows to tag/name the created image (repository/artifact:tag). For more options view the docs.
sudo docker imagesto verify the existence of the created image
- Now your are ready to run (see "Run Scenarioo Docker Image") or push (see Push image to Dockerhub) your image.
Push image to Dockerhub
To make an image public available it is necessary to push it to the Dockerhub. As soon as an image is publicly available on Dockerhub it can be run from everywhere without even pulling it in advance. Just run it as described in "Run Scenarioo Docker Image".
- Open a bash and check that the docker image is listed on the working machine:
sudo docker images
sudo docker loginfor authentication. You will be asked for the username (scenarioo) and the password.
- Run the command:
sudo docker push scenarioo/webapp:x.y.zwhere
x.y.zstands for the Scenarioo version.
- Check Dockerhub to verify the image.
Check the docs for further actions like deleting, tagging and other commands on images.