-
Notifications
You must be signed in to change notification settings - Fork 293
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
Dockerfile for M1 Mac #426
Open
iory
wants to merge
3
commits into
jsk-enshu:master
Choose a base branch
from
iory:docker
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
FROM ros:melodic-ros-core-bionic | ||
|
||
RUN apt -y update \ | ||
&& apt install -y \ | ||
ros-melodic-desktop-full \ | ||
iputils-ping \ | ||
net-tools \ | ||
wget \ | ||
bash \ | ||
fluxbox \ | ||
git \ | ||
net-tools \ | ||
novnc \ | ||
supervisor \ | ||
fluxbox \ | ||
x11vnc \ | ||
xterm \ | ||
xvfb \ | ||
iproute2 \ | ||
python-wstool \ | ||
python-catkin-tools | ||
|
||
RUN apt -y update \ | ||
&& apt install -y \ | ||
python-rosdep | ||
|
||
RUN mkdir -p /root/catkin_ws | ||
WORKDIR /root/catkin_ws | ||
RUN /bin/bash -c "source /opt/ros/melodic/setup.bash" | ||
RUN echo "source /opt/ros/melodic/setup.sh" >> /root/.bashrc | ||
WORKDIR /root/catkin_ws | ||
ENV HOME=/root \ | ||
DEBIAN_FRONTEND=noninteractive \ | ||
LANG=en_US.UTF-8 \ | ||
LANGUAGE=en_US.UTF-8 \ | ||
LC_ALL=C.UTF-8 \ | ||
DISPLAY=:0.0 \ | ||
DISPLAY_WIDTH=1920 \ | ||
DISPLAY_HEIGHT=1080 \ | ||
RUN_XTERM=yes \ | ||
RUN_FLUXBOX=yes \ | ||
ROS_MASTER_URI=http://localhost:11311 | ||
COPY . /app | ||
CMD ["/app/entrypoint.sh"] | ||
EXPOSE 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Dockerfile for jsk-enshu | ||
|
||
## For MAC-M1 user | ||
|
||
First, please install [Docker Desktop](https://www.docker.com/products/docker-desktop) and launch it. | ||
|
||
Next, clone this repository and build docker. | ||
|
||
``` | ||
$ git clone https://github.com/jsk-enshu/robot-programming | ||
$ cd robot-programming | ||
$ git remote add iory https://github.com/iory/robot-programming | ||
$ git fetch iory | ||
$ git checkout -b docker iory/docker | ||
$ cd docker | ||
$ ./build.sh | ||
``` | ||
|
||
After that, run the docker container. | ||
|
||
``` | ||
$ ./run.sh | ||
``` | ||
|
||
You can access inside the container by accessing the following url. | ||
|
||
http://localhost:8080/vnc_auto.html | ||
|
||
Now you can start the exercise! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
docker build --rm \ | ||
-t="jsk-enshu/ros-novnc-web:latest" \ | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[program:fluxbox] | ||
command=fluxbox | ||
autorestart=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[program:websockify] | ||
command=websockify --web /usr/share/novnc 8080 localhost:5900 | ||
autorestart=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[program:x11vnc] | ||
command=x11vnc -forever -shared | ||
autorestart=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[program:xterm] | ||
command=xterm | ||
autorestart=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[program:xvfb] | ||
command=Xvfb :0 -screen 0 "%(ENV_DISPLAY_WIDTH)s"x"%(ENV_DISPLAY_HEIGHT)s"x24 -listen tcp -ac | ||
autorestart=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
RUN_FLUXBOX=${RUN_FLUXBOX:-yes} | ||
RUN_XTERM=${RUN_XTERM:-yes} | ||
|
||
case $RUN_FLUXBOX in | ||
false|no|n|0) | ||
rm -f /app/conf.d/fluxbox.conf | ||
;; | ||
esac | ||
|
||
case $RUN_XTERM in | ||
false|no|n|0) | ||
rm -f /app/conf.d/xterm.conf | ||
;; | ||
esac | ||
|
||
exec supervisord -c /app/supervisord.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
docker run -it -p 8080:8080 \ | ||
--name ros-novnc-web \ | ||
jsk-enshu/ros-novnc-web:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[supervisord] | ||
nodaemon=true | ||
|
||
[include] | ||
files = /app/conf.d/*.conf |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should remove these lines before merging.