0

I have custom image where I want to run some tests which require installed app which in turn need openGL context. I can run it in container composed this way and manually build project and run tests. docker-compose.yml:

version: "3.6"
image: registry.gitlab.com/my_image_path:latest

volumes:
  - /tmp/.X11-unix/:/tmp/.X11-unix
  - /var/run/dbus:/var/run/dbus
  - /dev/shm:/dev/shm
privileged: true

And this is my gitlab-ci.yml:

linux-release-build-and-test:
  image: registry.gitlab.com/my_image_path:latest
  stage: build
  script:
    - cmake -DCMAKE_BUILD_TYPE=Release -D...
    - cmake --build . --target all -- -j8
    - libs/Some_Tests/Tests

Is there a way for me to either create a service (with volumes) and link to build image or add volumes to build image with app already installed? If not what are the alternatives?

Max K
  • 3
  • 1
  • 3

0 Answers0