forked from SHOP4CF/moni2-ros-monitor-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (34 loc) · 1.31 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Allow for dynamic base image during build
FROM osrf/ros:foxy-desktop
# use bash here and in the build-pipeline
SHELL ["bash", "-c"]
# Install depedencies
RUN apt-get -q2 update && apt-get install -y python3-wstool && apt-get install -y fonts-noto-color-emoji
RUN rosdep update
# How to start ROS2 code when we run a container
COPY entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
# Internal arguments
ARG WS_PATH=/ws
ARG WS_SRC_PATH=${WS_PATH}/src
# Copy workspace
COPY . ${WS_SRC_PATH}/repo_contents
# Install package dependencies
RUN wstool init ${WS_SRC_PATH} ${WS_SRC_PATH}/repo_contents/src_dependencies.rosinstall
RUN rosdep install -q --default-yes --ignore-packages-from-source --from-path ${WS_SRC_PATH}
# Build project
RUN echo "Building packages..."
WORKDIR ${WS_PATH}
RUN . /opt/ros/${ROS_DISTRO}/setup.sh && colcon build
LABEL version="0.1.0"
LABEL ros.distro=${ROS_DISTRO}
LABEL vcs-url="http://robotgit.localdom.net/ai-box/applications/moni2"
LABEL maintainer="Rasmus Lunding Henriksen <rlh@teknologisk.dk>"
LABEL description="This image will automatically start the moni2 application."
ENV PACKAGE_NAME="moni2"
ENV LAUNCHFILE_NAME="moni2.launch.py"
RUN adduser --quiet --disabled-password qtuser
RUN chown qtuser:qtuser ${WS_PATH}
# Needed for QT to be testable
# ENV QT_QPA_PLATFORM=offscreen
# ENV XDG_RUNTIME_DIR=/tmp