[go: up one dir, main page]

Add .gitlab-ci.yml for basic CI/CD to build docker images.

Hi,

I've just added a default GitLab CI/CD configuration file for building Docker images for Shinobi.

Now GitLab CI/CD succeeds to build properly working Docker images based on the repo's Dockerfile. Right now my CI/CD pipeline pushes the corresponding Docker image to my GitLab container registry.

Pushing to Docker Hub requires just setting CI/CD variables to match Docker Hub as the registry to push to. That's how I push images built from the ShinobiDocker repository to migoller/shinobidocker on Docker Hub.

How to run the pre-built image?

Feel free to run the pre-built image in the same way you'd run docker-compose.

  1. Create the required directories for Shinobi configuration, database and video files.
    $ mkdir -p \
        [Path to Shinobi direcory]/config \
        [Path to Shinobi direcory]/datadir \
        [Path to Shinobi direcory]/videos
  2. Run the pre-built image.
    $ docker run -it --name shinobicctv \
         -p 8080:8080 \
         -v /etc/localtime:/etc/localtime:ro \
         -v /etc/timezone:/etc/timezone:ro \
         -v [Path to Shinobi direcory]/config:/config \
         -v [Path to Shinobi direcory]/datadir:/var/lib/mysql \
         -v [Path to Shinobi direcory]/videos:/opt/shinobi/videos \
         registry.gitlab.com/migoller/shinobidocker:add-gitlab-ci
    If you like or need to, you can also add -v /dev/shm/shinobiDockerTemp:/dev/shm/streams to the volume mounts.

That's it. Feedback appreciated.

Regards, Michael

Merge request reports

Loading