0

I'm building a nodejs app and need npm. On the other hand, I need Docker-in-Docker for building the image. I need both of them at the same time.

No image contains both npm and dind, there is a separate image for npm and another for dind.

In Gitlab, I tried this, but still get "docker: command not found":

default:
  image: node:14
  services:
    - docker:20-dind

How can I have both npm and docker-in-docker at the same time?

2
  • You can have a dockerfile with node and using dind container you can build this image.
    – Alan
    Aug 11, 2022 at 14:33
  • Use a dockerfile to build the nodejs app. Then you only need 1 gitlab job which invokes docker build. Aug 17, 2022 at 5:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.