Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample Dockerfile fails on Play-With-Docker (running Alpine Linux) #6191

Closed
dannaf opened this issue Sep 16, 2019 · 3 comments · Fixed by #6585
Closed

Sample Dockerfile fails on Play-With-Docker (running Alpine Linux) #6191

dannaf opened this issue Sep 16, 2019 · 3 comments · Fixed by #6585
Labels
docker issues related to docker question user / developer questions

Comments

@dannaf
Copy link

dannaf commented Sep 16, 2019

Description

A sample Dockerfile for building Theia in a container does not work as-stated / out-of-the-box (using Play-With-Docker in the browser).

Reproduction Steps

Following the commented instructions at the top of this sample Dockerfile on https://labs.play-with-docker.com, I received the following error message at the end of the evaluation of the docker build -t theia . line:

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

When I then run the problematic line myself in the in-browser/playground terminal window, i.e., execute:

/bin/sh -c apt-get update && apt-get install -y npm && npm install -g yarn@1.3.2
update: line 1: apt-get: not found

the following response is generated:

update: line 1: apt-get: not found

OS and Theia version:
Chrome 69.0.3497.92
macOS Sierra 10.12.6
(No Theia version, since working on in-browser instance to install Theia via Dockerfile…)

Diagnostics:

The following show's the OS version of the Play-With-Docker (PWD) session during this experience (2019-09-15), revealing that PWD is running Alpine Linux:

[node1] (local) root@192.168.0.68 ~
$ cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.10.1
PRETTY_NAME="Alpine Linux v3.10"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"

The entire output of the docker build command from above is shown here for completeness, to clarify when in the process the error was printed:

[node1] (local) root@192.168.0.68 ~
$ docker build -t theia .
Sending build context to Docker daemon  38.14MB
Step 1/11 : FROM node:8
8: Pulling from library/node
092586df9206: Pull complete 
ef599477fae0: Pull complete 
4530c6472b5d: Pull complete 
d34d61487075: Pull complete 
87fc2710b63f: Pull complete 
e83c771c5387: Pull complete 
544e37709f92: Pull complete 
3aaf6653b5f3: Pull complete 
1fed50f6e111: Pull complete 
Digest: sha256:c00557b8634c74012eda82ac95f1813c9ea8c152a82f53ad71c5c9611f6f8c3c
Status: Downloaded newer image for node:8
 ---> 7a9afc16a57f
Step 2/11 : RUN useradd --create-home theia
 ---> Running in 281b70e68f13
Removing intermediate container 281b70e68f13
 ---> 7e2adca5ad6b
Step 3/11 : WORKDIR /home/theia
 ---> Running in c15c5fd6d724
Removing intermediate container c15c5fd6d724
 ---> 66d45f30ad52
Step 4/11 : RUN rm -rf /opt/yarn && rm -f /usr/local/bin/yarn && rm -f /usr/local/bin/yarnpkg
 ---> Running in 039125d07a0a
Removing intermediate container 039125d07a0a
 ---> e4b3efddc067
Step 5/11 : RUN apt-get update && apt-get install -y npm && npm install -g yarn@1.3.2
 ---> Running in 921026bdb1d3
Get:1 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:2 http://deb.debian.org/debian stretch InRelease
Get:3 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:4 http://deb.debian.org/debian stretch Release [118 kB]
Get:5 http://deb.debian.org/debian stretch Release.gpg [2365 B]
Get:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [503 kB]
Get:7 http://deb.debian.org/debian stretch-updates/main amd64 Packages [27.4 kB]
Get:8 http://deb.debian.org/debian stretch/main amd64 Packages [7086 kB]
Fetched 7922 kB in 6s (1291 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

When I ran a simple modified Dockerfile to check the OS of the node:8 image:

FROM node:8
CMD cat /etc/os-release

then docker build -t test . && docker run test:

$ docker run test
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
@akosyakov
Copy link
Member

@dannaf please have a look at docker images here: https://github.com/theia-ide/theia-apps i.e. docker full

@marcdumais-work are you aware of anyone using a Docker image in theia brorwser example? I've not tried it for years already. Maybe it is better to remove it.

@akosyakov akosyakov added docker issues related to docker question user / developer questions labels Sep 16, 2019
@502647092
Copy link
Contributor

@dannaf
Copy link
Author

dannaf commented Sep 16, 2019

Thanks! I'll try based on the docker full Dockerfiles, etc.

I think the in-browser example is nice to have, I would keep it and just update so that it works out-of-the-box.

vince-fugnitto added a commit that referenced this issue Nov 19, 2019
Fixes #6474
Fixes #6191

- removed the outdated and un-maintained example dockerfile from the repo.
- since the dockerfile is not maintained, and `play-with-docker` no longer
works without actually signing in, the dockerfile just caused issues and
users and adopters should instead be re-directed to `theia-apps` in order
to view concrete and thorough examples of docker images.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
vince-fugnitto added a commit that referenced this issue Nov 20, 2019
Fixes #6474
Fixes #6191

- removed the outdated and un-maintained example dockerfile from the repo.
- since the dockerfile is not maintained, and `play-with-docker` no longer
works without actually signing in, the dockerfile just caused issues and
users and adopters should instead be re-directed to `theia-apps` in order
to view concrete and thorough examples of docker images.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
akosyakov pushed a commit to akosyakov/theia that referenced this issue Feb 24, 2020
Fixes eclipse-theia#6474
Fixes eclipse-theia#6191

- removed the outdated and un-maintained example dockerfile from the repo.
- since the dockerfile is not maintained, and `play-with-docker` no longer
works without actually signing in, the dockerfile just caused issues and
users and adopters should instead be re-directed to `theia-apps` in order
to view concrete and thorough examples of docker images.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker issues related to docker question user / developer questions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants