Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
herzi
P
project
bob3
bobdude
Commits
fd9716a6
Commit
fd9716a6
authored
Oct 11, 2018
by
Sebastian Neuser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Dockerfile and container startup helper script
parent
3928b9c4
Pipeline
#664
failed with stages
in 1 second
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
0 deletions
+68
-0
linux/Dockerfile
linux/Dockerfile
+36
-0
linux/bobdude-docker.sh
linux/bobdude-docker.sh
+32
-0
No files found.
linux/Dockerfile
0 → 100644
View file @
fd9716a6
FROM
ubuntu:xenial
# Install build dependencies
RUN
apt-get update
RUN
apt-get
install
-y
--no-install-recommends
autoconf automake bison++ build-essential build-essential ca-certificates dirmngr flex-old git libboost-all-dev libusb-dev libusb-1.0-0-dev libwxgtk3.0-dev vim wget
RUN
apt-get clean
# Create bobdude user and homedir
RUN
useradd
-mU
bobdude
USER
bobdude
WORKDIR
/home/bobdude
# Get and compile AVRdude (dependency for Bobdude)
RUN
wget https://download.savannah.gnu.org/releases/avrdude/avrdude-6.3.tar.gz
RUN
wget https://download.savannah.gnu.org/releases/avrdude/avrdude-6.3.tar.gz.sig
RUN
gpg
--keyserver
hkp://pool.sks-keyservers.net
--recv-keys
5E84F980C3CAFD4BB5841070F48CA81B69A85873
RUN
gpg
--verify
avrdude-6.3.tar.gz.sig avrdude-6.3.tar.gz
RUN
tar
-xzf
avrdude-6.3.tar.gz
WORKDIR
/home/bobdude/avrdude-6.3
RUN
./configure
&&
make
USER
root
RUN
make
install
RUN
ldconfig
# Get and compile Bobdude itself
USER
bobdude
WORKDIR
/home/bobdude
RUN
git clone https://gitlab.com/chaos-siegen/project/bob3/bobdude.git
WORKDIR
/home/bobdude/bobdude/src
RUN
autoreconf
-i
&&
./configure
&&
make
USER
root
RUN
make
install
VOLUME
/home/bobdude/programs
WORKDIR
/home/bobdude/programs
CMD
bobdude
linux/bobdude-docker.sh
0 → 100755
View file @
fd9716a6
#!/bin/sh
# Starts bobdude in a docker container
# Parse and check command line parameters
TTY
=
$1
DIR
=
$2
if
[
-z
"
$TTY
"
-o
-z
"
$DIR
"
]
;
then
SCRIPT_NAME
=
`
basename
$0
`
echo
"usage:
$SCRIPT_NAME
<tty> <dir>"
echo
" tty absolute path to the programmer device"
echo
" dir absolute path to a shared folder containing .bob3 files"
echo
echo
"examples:"
echo
"
$SCRIPT_NAME
/dev/ttyACM0 /tmp/bob3"
echo
"
$SCRIPT_NAME
/dev/ttyUSB0
\$
HOME/bob3"
exit
fi
# Build the docker image if necessary
docker image
ls
|
grep
bobdude
>
/dev/null
||
docker build
-t
bobdude
.
# Allow local connections to X server
xhost +local:
# Run docker container
docker run
--rm
\
--device
$TTY
\
--volume
$PWD
/
$DIR
:/home/bobdude/programs
\
--env
DISPLAY
=
$DISPLAY
\
--volume
/tmp/.X11-unix:/tmp/.X11-unix
\
--name
bobdude
\
bobdude
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment