-
Notifications
You must be signed in to change notification settings - Fork 154
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
Initial implementation of docker images for both user and developers #12
Merged
Merged
Changes from all commits
Commits
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# common | ||
from ubuntu:latest | ||
copy build-common.sh /build-common.sh | ||
run /bin/bash -xe /build-common.sh | ||
run /bin/rm -f /build-common.sh |
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,20 @@ | ||
.PHONY: all | ||
all: dev user | ||
build: common dev user | ||
|
||
common: Dockerfile build-common.sh | ||
docker build -t brlcad-common:latest . | ||
|
||
dev: dev/Dockerfile dev/build-dev.sh common | ||
docker build -t brlcad-dev:latest dev | ||
|
||
user: user/Dockerfile user/build-user.sh common | ||
docker build -t brlcad-user:latest user | ||
|
||
.PHONY: tag push | ||
tag: | ||
docker tag brlcad-user:latest erikgreenwald/brl-cad:latest | ||
docker tag brlcad-dev:latest erikgreenwald/brl-cad-dev:latest | ||
push: tag | ||
docker push erikgreenwald/brl-cad:latest | ||
docker push erikgreenwald/brl-cad-dev: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,7 @@ | ||
# Docker images for BRL-CAD development | ||
|
||
This starts up both the developer and user images. Instructions for each (as well as how to launch independantly) are in the subdirs. | ||
|
||
start with: | ||
make all | ||
docker-compose -p brlcad up -d --build |
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,7 @@ | ||
apt-get -q update -y | ||
apt-get -q dist-upgrade -y | ||
useradd -rm -d /home/cadling -s /bin/bash -g root -u 1001 cadling | ||
echo root:brlcad | chpasswd | ||
echo cadling:brlcad | chpasswd | ||
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -qy install tzdata openssh-server xauth libopengl0 tk libqt5widgets5 libpng16-16 | ||
service ssh start |
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,9 @@ | ||
# common | ||
from brlcad-common:latest | ||
|
||
copy build-dev.sh /build-dev.sh | ||
copy /startup /startup | ||
run /bin/bash -xe /build-dev.sh | ||
run /bin/rm -f /build-dev.sh | ||
|
||
cmd ["/bin/bash","-x","/startup"] |
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 @@ | ||
# Docker image for BRL-CAD development | ||
|
||
start with: | ||
make all | ||
docker-compose -p brlcad up -d --build | ||
|
||
opens ssh on port 4322. Source is checked out to /brlcad and obj dir configured in /brlcad/build. | ||
|
||
User: cadling | ||
User password: brlcad | ||
Root password: brlcad | ||
|
||
from the vs code remote extension: | ||
|
||
ssh -ACX -l cadling -p 4322 localhost | ||
|
||
then install various extensions, like cmake, c++, doxygen, etc. | ||
|
||
For other user cases, it might be better to mount a local fs (volume to dir in docker-compose.yaml) or NFS mount and have a user with the appropriate uid. |
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,10 @@ | ||
DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get -qy install cmake git build-essential ninja-build swig doxygen libpng-dev libgl1-mesa-dev libopenmpi-dev libqt5opengl5-dev libeigen3-dev itk3-dev time npm | ||
npm install -g @antora/cli @antora/site-generator-default | ||
npm install -g antora-site-generator-lunr | ||
|
||
mkdir -m 755 /brlcad | ||
chown -R cadling /brlcad | ||
chmod 555 /startup | ||
|
||
su cadling -c '/usr/bin/time -v /usr/bin/git clone https://github.com/BRL-CAD/brlcad.git /brlcad' | ||
su cadling -c '/usr/bin/time -v /usr/bin/cmake -G Ninja -S /brlcad/ -B /brlcad/build/ -DBRLCAD_ENABLE_QT=ON' |
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,11 @@ | ||
version: "3" | ||
services: | ||
dev: | ||
build: . | ||
environment: | ||
- DISPLAY=${DISPLAY} | ||
volumes: | ||
- /tmp/.X11-unix:/tmp/.X11-unix | ||
ports: | ||
- "4301:5901" | ||
- "4322:22" |
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,2 @@ | ||
#!/bin/sh | ||
/usr/sbin/sshd -Dd |
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,20 @@ | ||
version: "3" | ||
services: | ||
dev: | ||
build: dev | ||
environment: | ||
- DISPLAY=${DISPLAY} | ||
volumes: | ||
- /tmp/.X11-unix:/tmp/.X11-unix | ||
ports: | ||
- "4301:5901" | ||
- "4322:22" | ||
user: | ||
build: user | ||
environment: | ||
- DISPLAY=${DISPLAY} | ||
volumes: | ||
- /tmp/.X11-unix:/tmp/.X11-unix | ||
ports: | ||
- "4201:5901" | ||
- "4222:22" |
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,12 @@ | ||
# common | ||
from brlcad-common:latest | ||
|
||
# BRL-CAD | ||
copy BRL-CAD_7.32.5_Linux_x86_64.tar.gz /BRL-CAD_7.32.5_Linux_x86_64.tar.gz | ||
copy build-user.sh /build-user.sh | ||
copy startup /startup | ||
copy xinit /xinit | ||
run /bin/bash -xe /build-user.sh | ||
run /bin/rm -f /build-user.sh /BRL-CAD_7.32.5_Linux_x86_64.tar.gz | ||
|
||
cmd ["/bin/sh", "-x", "/startup"] |
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,21 @@ | ||
# Docker image for BRL-CAD | ||
|
||
You will need to furnish BRL-CAD\_7.32.5\_Linux\_x86.tar.gz yourself. Place it in this directory before building the docker images. | ||
|
||
start with: | ||
make all | ||
docker-compose -p brlcad up -d --build | ||
|
||
BRL-CAD is installed in /opt/brlcad and the path is pre-configured. | ||
|
||
Starts a VNC server listening on port 4201 with Archer running. | ||
|
||
|
||
also opens ssh on port 4222. | ||
|
||
* User: cadling | ||
* User password: brlcad | ||
* Root password: brlcad | ||
|
||
|
||
this little guide should probably be super user friendly instead of what it is. |
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,14 @@ | ||
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -qy install openbox menu tigervnc-standalone-server | ||
echo 'export PATH=$PATH:/opt/brlcad/bin' >> /etc/bash.bashrc | ||
chmod 555 /startup /xinit | ||
su cadling -c 'touch /home/cadling/.Xauthority' | ||
su cadling -c 'mkdir /home/cadling/.vnc/' | ||
su cadling -c 'echo brlcad | vncpasswd -f > /home/cadling/.vnc/passwd' | ||
su cadling -c 'chmod 600 /home/cadling/.vnc/passwd' | ||
mkdir -p /opt/brlcad/ | ||
ln -s /opt/brlcad/BRL-CAD_7.32.5_$(uname -s)_$(uname -m)/bin /opt/brlcad/ | ||
ln -s /opt/brlcad/BRL-CAD_7.32.5_$(uname -s)_$(uname -m)/include /opt/brlcad/ | ||
ln -s /opt/brlcad/BRL-CAD_7.32.5_$(uname -s)_$(uname -m)/libexec /opt/brlcad/ | ||
ln -s /opt/brlcad/BRL-CAD_7.32.5_$(uname -s)_$(uname -m)/lib /opt/brlcad/ | ||
ln -s /opt/brlcad/BRL-CAD_7.32.5_$(uname -s)_$(uname -m)/share /opt/brlcad/ | ||
tar -zxf BRL-CAD_7.32.5_Linux_x86_64.tar.gz -C /opt/brlcad/ | ||
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,11 @@ | ||
version: "3" | ||
services: | ||
user: | ||
build: . | ||
environment: | ||
- DISPLAY=${DISPLAY} | ||
volumes: | ||
- /tmp/.X11-unix:/tmp/.X11-unix | ||
ports: | ||
- "4201:5901" | ||
- "4222:22" |
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 @@ | ||
#!/bin/sh | ||
su - cadling -c "/usr/bin/tigervncserver -fg -localhost no -geometry 1200x600 -xstartup /xinit" & | ||
/usr/sbin/sshd -Dd |
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,6 @@ | ||
#!/bin/sh | ||
/usr/bin/openbox-session & | ||
PID=$! | ||
/opt/brlcad/bin/archer & | ||
/usr/bin/xterm & | ||
wait $PID |
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 notice that the release number 7.32.5 is hard-coded everywhere.
Maybe it should be parameterized somehow.