Is it possible to deploy a dockerized app to Gitlab pages?

I have a dockerized app I want to host on Gitlab Pages.

I have a build step

  stage: docker-build
  image: docker:latest
    - name: docker:dind
     - echo $CI_BUILD_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
    - docker build --pull -t "$CI_REGISTRY_IMAGE" .
    - docker push "$CI_REGISTRY_IMAGE"
    - echo "Registry image:" $CI_REGISTRY_IMAGE

which is fine, but is it possible now to deploy to pages? I tried to create a pages stage to pull container again, push and run, but pages are not even created, I understand there must be a public folder created during the pages stage , but it didn`t help. Now I wonder if it is even possible.

no, GitLab Pages only work with files. You cannot use GitLab Pages with page in container.

1 Like