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

Why will che.sh be invoked when the docker container is started? #165

Closed
freewind opened this issue Jan 8, 2016 · 1 comment
Closed

Comments

@freewind
Copy link

freewind commented Jan 8, 2016

This is might be a more "docker" question than "che".

I'm starting to read the code to resolve my problems, and when I see Dockerfile, I can't figure out why che will start when the docker container is started?

From the file: https://github.com/codenvy/che/blob/master/Dockerfile, I can't find where the che related shell is invoked:

FROM ubuntu
RUN apt-get update && apt-get -y install curl sudo procps wget && \
    echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
    useradd -u 1000 -G users,sudo -d /home/user --shell /bin/bash -m user && \
    echo "secret\nsecret" | passwd user && \
    curl -sSL https://get.docker.com/ | sh && \
    usermod -aG docker user && sudo apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

USER user
ENV JAVA_VERSION=8u65 \
    JAVA_VERSION_PREFIX=1.8.0_65 \
    CHE_LOCAL_CONF_DIR=/home/user/.che
RUN mkdir /home/user/.che && \
    wget \
   --no-cookies \
   --no-check-certificate \
   --header "Cookie: oraclelicense=accept-securebackup-cookie" \
   -qO- \
   "http://download.oracle.com/otn-pub/java/jdk/$JAVA_VERSION-b17/jre-$JAVA_VERSION-linux-x64.tar.gz" | sudo tar -zx -C /opt/
ENV JAVA_HOME /opt/jre$JAVA_VERSION_PREFIX

# expose 8080 port and a range of ports for runners

EXPOSE 8080 32768-65535

ADD /assembly-main/target/eclipse-che-*/eclipse-che-* /home/user/che

CMD  sudo chown -R user:user /home/user/che && \
     sudo service docker start && tail -f /dev/null

Thanks for help~

@freewind freewind closed this as completed Jan 8, 2016
@freewind freewind reopened this Jan 8, 2016
@TylerJewell
Copy link

This version of the dockerfile does not launch the Che tomcat server but this will be undone. In the Che startup scripts we are launching the Che image and the internal tomcat separately to better manage the workflow. We have a way to use the same image to achieve both startup approaches - with the tomcat started and without. So we will revert this change.

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

2 participants