An ubuntu image with basic dependencies to build and run a finroc environment.
docker
- optional
docker-compose
docker pull finrocunoffical/finroc_deps:latest
or docker pull finrocunoffical/finroc_deps:v1
or docker pull finrocunoffical/finroc_deps:extra_libs
docker run -v ./finroc_user:/home/finroc_user -v /etc/localtime:/etc/localtime:ro -i -t finrocunoffical/finroc_deps bash
-v /etc/localtime:/etc/localtime:ro
is optional, but you can get compile errors (unit tests) related to time zone
docker-compose run finroc bash
By default (for docker-compose
) the folder ./finroc_user
(relative to the current console) is mounted as /home/finroc_user
within the container
When setting up a folder for use as volume, chmod -R 777 <folder>
allows any user to write to this folder. This allows you to edit files from within the container and from your host computer.
Running a docker container WITHOUT any volumes will not save any data at all between runs. All user data is lost !
Write a new Dockerfile
FROM finrocunoffical/finroc_deps:latest
USER root
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \
<YOUR_NEW_PACKAGES> \
&& rm -rf /var/lib/apt/lists/*
USER finroc_user
We will not provide a finroc installation here, only the system and dependencies to build and run it. Some finroc libraries or projects may need additional dependencies. You should be notified about them when building.
You can download your finroc installation from within the container or download it externally to the folder mounted at /home/finroc_user
. You can treat the environment within the container as a normal linux home. Thus you can create authorization files for mercurial (.hgrc)
or git if necessary within /home/finroc_user
.
https://github.com/finrocunoffical/docker-finroc_deps-x11
docker pull finrocunoffical/finroc_deps:latest
to get the latest image- Go to
Project -> Properties
, thenC/C++ Build -> Settings
and in theContainer Settigns
tab checkBuild inside Docker image
- Now you should be able to build within eclipse using this Docker image
- Install
C/C++ Docker Container Launch Support
underHelp -> Install New Software
- Add new "run configuration" as
C/C++ Container Launcher
- Go to tab "Container" and select Image
finrocunofficial/finroc_deps
- In tab "Main" select the "C/C++ Application" to launch (recommended to use "Search Project" function)
- Install
C/C++ Docker Container Launch Support
underHelp -> Install New Software
- Add new "Debug configuration" as
C/C++ Container Launcher
- Go to tab "Container" and select Image
finrocunofficial/finroc_deps
- In tab "Main" select the "C/C++ Application" to launch (recommended to use "Search Project" function)
You might want to connect from one container to another, when e.g. debugging an application that connects to a program running in another container. Using the docker default network bridge it is possible to connect to locally running containers. Currently this process is rather cumbersome.
docker ps
to get a list of all docker containers. Find the container ID you want to connect todocker inspect <ID> | grep '"IPAddress"' | head -n 1
to get the IP address of that container- You can connect to that container from other containers at this IP