Files
mrva-docker/containers/server/README.org

1.6 KiB

server container image build

  • build container

      # Build the container via
      cd ~/work-gh/mrva/mrva-docker/containers/server/
      docker build --no-cache --network host -t mrva-server:0.4.0 .
    
      # The --network host  is needed when using ../aptcacher/
    
      # Run the container in standalone mode via
      cd ~/work-gh/mrva/mrva-docker/containers/server/
      docker run -d mrva-server:0.4.0
    
      # Just run bash in the container
      docker run --env-file ../../.env.container --rm -it \
             --entrypoint /bin/bash \
             mrva-server:0.4.0
      # In the container:
      '
          ls /opt/codeql/codeql
          /opt/codeql/codeql version |head -1
      CodeQL command-line toolchain release 2.20.1.
      '
  • Tag the container. This is sufficient for further use on the local machine.

      # tag it
      cd ~/work-gh/mrva/mrva-docker/containers/server &&\
          docker tag mrva-server:0.4.0 \
                 ghcr.io/hohn/mrva-server:0.4.0
  • Push this container

      docker push ghcr.io/hohn/mrva-server:0.4.0
  • Test the registry image

      # Test pushed container
      docker pull ghcr.io/hohn/mrva-server:0.4.0
      docker run                                      \
             --env-file ../../.env.container          \
             --name test-mrva-server                  \
             --rm -it ghcr.io/hohn/mrva-server:0.4.0 \
             --mode=container --loglevel=debug        \
             /bin/bash