blob: b5169e061a3b97658fed57e1697e40cc576779c0 (
plain) (
tree)
|
|
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
# Boot docker SITL environment
#
# "vagrant up" will build the images. Should start "xterm" in the end.
#
# Notes:
# (will change, need proper docs)
#
# Build with multiple dependent docker containers:
# Use the "--no-parallel" option so the containers will be built in order.
# e.g.: "vagrant up --no-parallel"
#
# Running apps directly:
# "vagrant docker-run ros -- <cmd>"
# Attention: will loose all data when stopped, vagrant runs this with "--rm"
#
# TODO
# - maybe map a local working directory to compile stuff without loosing it in side the docker container
#
Vagrant.configure(2) do |config|
# Configure docker host
config.vm.provider "docker" do |d|
d.vagrant_machine = "docker-host"
d.vagrant_vagrantfile = "../docker-host/Vagrantfile"
end
# Configure docker apps to run
config.vm.define "ros" do |app|
app.vm.provider "docker" do |d|
d.name = "ros"
#d.image = "px4ros/ros-base:no-drcsim"
d.build_dir = "../../docker/px4-ros"
d.build_args = ["-t=px4ros/ros-base:no-drcsim"]
# share docker host x11 socket
d.volumes = [
"/tmp/.X11-unix:/tmp/.X11-unix:ro",
"/dev/dri:/dev/dri"
]
# TODO: get display number from host system
d.env = {
"DISPLAY" => ":0"
}
d.remains_running = true
d.cmd = ["xterm"]
#d.has_ssh = true
end
end
end
|