Skip to content
This repository has been archived by the owner on Jan 24, 2020. It is now read-only.
Geronimo Poppino edited this page Mar 4, 2017 · 2 revisions

Procedure to build Docker image and container with the bot

  • Clone the repository:

    $ git clone https://github.com/MadCoderZ/NewsBotIRC.git

    $ cd NewsBotIRC

  • Edit config file src/main/resources/newsbot.properties

  • Build the image

    $ docker build -t newsbot .

  • Run a disposable containter to test it

    $ docker run --rm -it newsbot:latest

  • If everything went well, create the container

    $ docker create --name newsbot newsbot

  • Setup the container to be restarted in case of failure. Try only 5 times and then abort.

    $ docker update --restart=on-failure:5 newsbot

  • Start the container

    $ docker start newsbot

Other useful commands:

List only running containers:

$ docker ps

List all containers:

$ docker ps -a

List images:

$ docker images

Remove container:

$ docker rm CONTAINER_ID

Remove image:

$ docker rmi IMAGE_ID

Note: To use Docker as a regular user, add said user to the docker group.