Build docker image for theia

Please refer to the dockerfile :
I tried to build image on git bash: docker build -t theia . Here is the output :

$ docker build -t theia .
Sending build context to Docker daemon 74.75kB
Step 1/11 : FROM node:8
—> a5c31320f223
Step 2/11 : RUN useradd --create-home theia
—> Running in 22d17edc1b61
Removing intermediate container 22d17edc1b61
—> 869d89f5cd4c
Step 3/11 : WORKDIR /home/theia
—> Running in da1263aea185
Removing intermediate container da1263aea185
—> a05d8882fd00
Step 4/11 : RUN rm -rf /opt/yarn && rm -f /usr/local/bin/yarn && rm -f /usr/local/bin/yarnpkg
—> Running in 8599b1a53a80
Removing intermediate container 8599b1a53a80
—> 2ae0b2d019c8
Step 5/11 : RUN apt-get update && apt-get install -y npm && npm install -g yarn@1.3.2
—> Running in 2d60e48489cd
Get:1 stretch/updates InRelease [94.3 kB]
Ign:2 stretch InRelease
Get:3 stretch-updates InRelease [91.0 kB]
Get:4 stretch Release [118 kB]
Get:5 stretch Release.gpg [2434 B]
Get:6 stretch/updates/main amd64 Packages [492 kB]
Get:7 stretch-updates/main amd64 Packages [31.7 kB]
Get:8 stretch/main amd64 Packages [7082 kB]
Fetched 7912 kB in 3s (2215 kB/s)
Reading package lists…
Reading package lists…
Building dependency tree…
Reading state information…
E: Unable to locate package npm
The command ‘/bin/sh -c apt-get update && apt-get install -y npm && npm install -g yarn@1.3.2’ returned a non-zero code: 100

How can i resolve the error?

[original thread by rs]

Hi @che-theia-new

That’s a very old Dockerfile. Please have a look here:

“theia-docker” could be what you are looking-for,

Most of the images in there are published daily on dockerhub:


thank you