Using Docker and Cypress in Same Docker Image

  cypress, docker

Fair warning: I’m new to all of this, so there there might be some mistakes in my thinking process.

I want to system test an application we are developing, and we ship this application via Docker, so that’s what I want to test.

For GitLab CI, this means creating a Docker image which has Docker in Docker and Cypress, since that is what I’d like to use.

So just from checking the Docker docs I can see that Docker can be installed on a multitude of Linux distros, but not on Alpine. The official image however is Alpine.

The Cypress docs however show that Cypress can not be installed to Alpine. Only the package managers "apt-get" and "yum" are supported, which is Ubuntu and Fedora, respectively.

So as far as I can tell, it’s not possible to have both of these at once? Which would be absolutely baffling (but so is the package manager chaos I just learned about).

What I tried:

  • used the Docker image as a base and tried to install Cypress (does not work because there is no installation manual and the package you need to install via apt-get don’t exist for apk)
  • used the Cypress image as a base and tried to install Docker (does not work because the Cypress images don’t work)
  • used another image and tried to install both (does not work because installing Docker inside the Docker container does not work, that’s why they have the image provided)
  • used DinD with another distro (cruizba/ubuntu-dind, fails with " dockerd is not running after max time")

So… what am I missing? Is there any way to get to the point where I can use both Cypress and DinD in the same image?

Source: Docker Questions