Skip to content

Modify docker related configs, add zsh, change IDE_HOME, add hostname #60

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

Merged
merged 1 commit into from
Nov 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,35 @@ MAINTAINER tanhe123 from Coding IDE Team <tanhe123@coding.net>

EXPOSE 8080

# Add user `coding`
RUN apt-get update && apt-get install -y zsh && apt-get clean && rm -rf /var/lib/apt/lists/*

RUN useradd --create-home --home-dir /home/coding --shell /usr/bin/bash coding \
# Add user `coding`
RUN useradd --create-home --home-dir /home/coding --shell /usr/bin/zsh coding \
&& echo "coding:coding" | chpasswd \
&& adduser coding sudo \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

USER coding

ENV HOME /home/coding
ENV SHELL /usr/bin/zsh
ENV TERM xterm
ADD . /opt/coding/WebIDE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 layer 有没有办法去掉,只留 ide-backend.jar?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该是没办法。。。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里面说了这么多。但实际上都是proposal。没有一个是实际可用的。


RUN sudo chown -R coding /opt/coding/WebIDE
# Install oh-my-zsh
RUN git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh \
&& cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

RUN sudo chown -R coding /opt/coding/WebIDE \
&& mkdir $HOME/.m2

RUN cd /opt/coding/WebIDE/frontend && npm install && npm run build \
&& cd /opt/coding/WebIDE/frontend-webjars && mvn clean install \
&& cd /opt/coding/WebIDE/backend && mvn clean package -Dmaven.test.skip=true \
&& cp /opt/coding/WebIDE/backend/target/ide-backend.jar /opt/coding/WebIDE \
&& cd /opt/coding/WebIDE/frontend && rm -r build node_modules \
&& cd /opt/coding/WebIDE/frontend-webjars && mvn clean \
&& cd /opt/coding/WebIDE/backend && mvn clean
&& cd /opt/coding/WebIDE/backend && mvn clean \
&& rm -fr $HOME/.m2

ENV CODING_IDE_HOME /home/coding/coding-ide-home
CMD ["java", "-jar", "/opt/coding/WebIDE/ide-backend.jar", "--PTY_LIB_FOLDER=/opt/coding/WebIDE/backend/src/main/resources/lib"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ If changed, restart the application to let your configurations take effect. Note
## Docker Server

```
docker run -p 8080:8080 --name webide webide/webide
docker run -p 8080:8080 -h webide --name webide webide/webide
```

To learn more about docker commands,please refer to wiki [English](https://github.com/Coding/WebIDE/wiki/Docker-Server.en) [中文](https://github.com/Coding/WebIDE/wiki/Docker-Server.zh)
2 changes: 1 addition & 1 deletion frontend
Submodule frontend updated 48 files
+2 −1 .babelrc
+15 −5 README.md
+28 −0 app/api/gitAPI.js
+19 −4 app/commands/commandBindings/git.js
+5 −13 app/components/AceEditor/actions.js
+8 −11 app/components/AceEditor/reducer.js
+16 −0 app/components/DragAndDrop/actions.js
+170 −0 app/components/DragAndDrop/index.jsx
+69 −0 app/components/DragAndDrop/reducer.js
+8 −24 app/components/FileTree/actions.js
+59 −58 app/components/FileTree/reducer.js
+155 −12 app/components/Git/actions.js
+5 −1 app/components/Git/index.jsx
+117 −0 app/components/Git/modals/reset.jsx
+65 −0 app/components/Git/modals/stash.jsx
+177 −0 app/components/Git/modals/unstash.jsx
+61 −11 app/components/Git/reducer.js
+15 −0 app/components/MenuBar/menuBarItems.js
+14 −6 app/components/Modal/index.jsx
+5 −2 app/components/Modal/modals/index.js
+18 −5 app/components/Notification/actions.js
+2 −2 app/components/Notification/reducer.js
+66 −53 app/components/Pane/PaneAxis.jsx
+2 −2 app/components/Pane/PanesContainer.jsx
+15 −23 app/components/Pane/actions.js
+132 −71 app/components/Pane/reducer.js
+9 −16 app/components/Panel/actions.js
+45 −46 app/components/Panel/reducer.js
+11 −40 app/components/Tab/actions.js
+8 −9 app/components/Tab/index.jsx
+80 −52 app/components/Tab/reducer.js
+15 −6 app/components/Workspace/actions.js
+2 −1 app/components/Workspace/index.jsx
+22 −18 app/components/Workspace/reducer.js
+2 −2 app/containers/IDE.jsx
+5 −8 app/containers/Panels.jsx
+3 −0 app/containers/Utilities.jsx
+6 −4 app/store.js
+6 −0 app/styles/components/DragAndDrop.styl
+45 −0 app/styles/components/Git.styl
+11 −0 app/styles/components/Modal.styl
+2 −1 app/styles/components/PaneView.styl
+4 −0 app/styles/components/Workspace.styl
+1 −0 app/styles/components/index.styl
+1 −0 app/styles/main.styl
+3 −0 app/styles/zindex.styl
+4 −0 package.json
+4,766 −0 yarn.lock
2 changes: 1 addition & 1 deletion ide.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ sub_docker() {
create_dir_if_not_exist $HOME/.coding-ide-home

echo "creating container $CONTAINER"
docker create -p 8080:8080 -v $HOME/.coding-ide-home:/home/coding/.coding-ide-home --name webide webide/webide
docker create -p 8080:8080 -v $HOME/.coding-ide-home:/home/coding/coding-ide-home --name webide -h webide webide/webide
valid_last_cmd
elif [ "$RUNNING" == "true" ]; then
echo "CRITICAL - $CONTAINER is running."
Expand Down