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

CHE_SERVER_CONTAINER_NAME doesn't have any effect. #2187

Closed
linuxd3v opened this issue Aug 22, 2016 · 13 comments
Closed

CHE_SERVER_CONTAINER_NAME doesn't have any effect. #2187

linuxd3v opened this issue Aug 22, 2016 · 13 comments

Comments

@linuxd3v
Copy link

When starting eclipse che Im using CHE_SERVER_CONTAINER_NAME environmental variable.
ex: -e CHE_SERVER_CONTAINER_NAME="che_jcarter"

My understanding of how it's supposed to work -> is that after che container boots it would have a name che_jcarter.

However this doesn't seem to work. After booting che container has a name = che-server:

stan@stan-ThinkPad-W540:~$ docker run --rm -t \
>     -v /var/run/docker.sock:/var/run/docker.sock \
>     -e CHE_SERVER_CONTAINER_NAME="che_jcarter" \
>     -e CHE_HOSTNAME=localhost \
>     -e CHE_RESTART_POLICY=always \
>     -e CHE_PORT=3007 \
>     -e CHE_DATA_FOLDER=/srv/che/developers/jcarter/data \
>     eclipse/che start
INFO: ECLIPSE CHE: ALREADY HAVE IMAGE codenvy/che-server:latest
INFO: ECLIPSE CHE: CONTAINER STARTING
INFO: ECLIPSE CHE: SERVER LOGS AT "docker logs -f che-server"
INFO: ECLIPSE CHE: SERVER BOOTING...
INFO: ECLIPSE CHE: BOOTED AND REACHABLE
INFO: ECLIPSE CHE: http://localhost:3007

stan@stan-ThinkPad-W540:~$ docker ps
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS              PORTS                              NAMES
9842b6ecd6b4        codenvy/che-server:latest   "/home/user/che/bin/c"   7 seconds ago       Up 7 seconds        8000/tcp, 0.0.0.0:3007->8080/tcp   che-server
stan@stan-ThinkPad-W540:~$ 
@TylerJewell
Copy link

This variable -e CHE_SERVER_CONTAINER_NAME="che_jcarter" is not available until 4.7. It's in the PR #2119.

@linuxd3v
Copy link
Author

@TylerJewell nah - still doesn't seem to work in 4.7.

@linuxd3v
Copy link
Author

I pulled latest 4.7 release, then launched Che like this:

docker run --rm -t \
>     -v /var/run/docker.sock:/var/run/docker.sock \
>     -e CHE_SERVER_CONTAINER_NAME="che_jcarter" \
>     -e CHE_HOSTNAME=localhost \
>     -e CHE_RESTART_POLICY=always \
>     -e CHE_PORT=3007 \
>     -e CHE_VERSION=latest \
>     -e CHE_DATA_FOLDER=/srv/che/developers/jcarter/data \
>     eclipse/che start
INFO: ECLIPSE CHE: ALREADY HAVE IMAGE codenvy/che-server:latest
INFO: ECLIPSE CHE: CONTAINER STARTING
INFO: ECLIPSE CHE: SERVER LOGS AT "docker logs -f che-server"
INFO: ECLIPSE CHE: SERVER BOOTING...
INFO: ECLIPSE CHE: BOOTED AND REACHABLE
INFO: ECLIPSE CHE: http://localhost:3007

But docker ps output is this:

docker ps
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS              PORTS                              NAMES
54e57b9d261f        codenvy/che-server:latest   "/home/user/che/bin/c"   10 seconds ago      Up 9 seconds        8000/tcp, 0.0.0.0:3007->8080/tcp   che-server

Seems like CHE_SERVER_CONTAINER_NAME didn't work.

@TylerJewell
Copy link

You don't have the right image :). Your image is still 4.6 for the che-launcher.

Try CHE_VERSION=4.7 or CHE_VERSION=nightly

@TylerJewell
Copy link

I can tell that it is 4.5 launcher as the letters are all caps. We changed it so I know your image is out of date.

@linuxd3v
Copy link
Author

@TylerJewell thx.
Why can't it find 4.7? I thought it was published - am I doing it right?

stan@stan-ThinkPad-W540:/var/data/app/sc/dict_data/v1$ docker run --rm -t \
>     -v /var/run/docker.sock:/var/run/docker.sock \
>     -e CHE_SERVER_CONTAINER_NAME="che_jcarter" \
>     -e CHE_HOSTNAME=localhost \
>     -e CHE_RESTART_POLICY=always \
>     -e CHE_PORT=3007 \
>     -e CHE_VERSION=4.7 \
>     -e CHE_DATA_FOLDER=/srv/che/developers/jcarter/data \
>     eclipse/che start
Unable to find image 'eclipse/che:latest' locally
latest: Pulling from eclipse/che
e110a4a17941: Already exists 
495e4dd69a48: Pull complete 
2df88a24dd1e: Pull complete 
c7c85af727bc: Pull complete 
976cbcefd772: Pull complete 
c3590c99b558: Pull complete 
Digest: sha256:c6963c5c07d9509f3d25fff5559a101813b6ed6631335787981284d21f49c07e
Status: Downloaded newer image for eclipse/che:latest
INFO: ECLIPSE CHE: Pulling image codenvy/che-server:4.7
Pulling repository docker.io/codenvy/che-server
FATA[0000] Tag 4.7 not found in repository docker.io/codenvy/che-server 
stan@stan-ThinkPad-W540:/var/data/app/sc/dict_data/v1$

@benoitf
Copy link
Contributor

benoitf commented Aug 31, 2016

Tag is 4.7.0

@TylerJewell
Copy link

4.7 was shipped a couple hours ago, so yes it should be there. The tag is 4.7.0, latest.
https://hub.docker.com/r/eclipse/che/tags/

If you already have a latest tag, however, you must delete the latest image and then pull it again. Maybe we should add a feature in the "update" CLI where if you do "che update --force", we will delete teh image and redownload it to verify you have the latest.

@linuxd3v
Copy link
Author

@benoitf ahh yes yes - it worked when I changed label to 4.7.0. Thx!

@TylerJewell
Copy link

@riuvshin - can we consider tagging 4.7.0 and 4.7 at the same time? I think this will be a common thing.

@riuvshin
Copy link
Contributor

riuvshin commented Sep 1, 2016

@TylerJewell no we have different versioning, there could be bugfixes like 4.7.1 4.7.2 which is not compatible with 4 or 4.7 versioning models. I would say just use latest to get latest tag.

@benoitf
Copy link
Contributor

benoitf commented Sep 1, 2016

@riuvshin it is compatible as 4.7 will be updated to 4.7.1 if there is a new 4.7.x
and 4 will be updated for each new major version (like 4 could point to 4.8.2 then 4.9.0) etc

this is how all base dockerhub images are working

@TylerJewell
Copy link

Roman - yes please consider what florent is suggesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants