Skip to main content


This page provides some examples for how to run the DroneDeploy Agent, in conjunction with ROS, in a Docker container. Note that there are a large number of possible configurations and topologies by which you could run the Agent in a container, so use these examples as a guide for creating your own container images.

Agent & ROS Master in a Single Container

Create a docker file to generate an image, based on Ubuntu Xenial, which includes both ROS and the Agent combined together:

FROM ubuntu:xenial

# install prerequisites
RUN apt-get update && apt-get install -y apt-transport-https gnupg ca-certificates

# install ROS
RUN sh -c 'echo "deb xenial main" > /etc/apt/sources.list.d/ros-latest.list'
RUN apt-key adv --keyserver 'hkp://' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
RUN apt-get update && apt-get install -y ros-kinetic-ros-base curl

# install DroneDeploy Agent
RUN sh -c 'echo "deb stable main " > /etc/apt/sources.list.d/rocos.list'
RUN sh -c 'curl | apt-key add -'
RUN apt-get update && apt-get install rocos-agent -y

COPY ./ /
RUN chmod +x /

# declare env vars to be populated at container run time with --env flag
ENV agent_pat ""
ENV agent_callsign ""
ENV agent_name ""

# run the agent and ros master

This container image runs a script at startup, this script starts ROS as well as the Agent:

#!/usr/bin/env bash

set -e

# setup ros environment
source "/opt/ros/kinetic/setup.bash"

# run the rosmaster
roscore &

# run the agent
exec rocos-agent -p "${agent_pat}" -c "${agent_callsign}" -n "${agent_name}" -f -d

Note that you need to provide the necessary information for provisioning the Agent (PAT, callsign and name) to the container using the environment flag.