-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
76 lines (65 loc) · 2.15 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
###########################################
# ROS2 Foxy base image
###########################################
FROM ubuntu:20.04 AS foxy-base
# Enable noninteractive apt
ENV DEBIAN_FRONTEND=noninteractive
# Install language
RUN apt-get update && apt-get install -y \
locales \
&& locale-gen en_US.UTF-8 \
&& update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 \
&& rm -rf /var/lib/apt/lists/*
ENV LANG en_US.UTF-8
# Install timezone
RUN ln -fs /usr/share/zoneinfo/UTC /etc/localtime \
&& apt-get update && apt-get install -y \
tzdata \
&& dpkg-reconfigure --frontend noninteractive tzdata \
&& rm -rf /var/lib/apt/lists/*
# Install ROS2
RUN apt-get update && apt-get install -y \
curl \
gnupg2 \
lsb-release \
&& curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null \
&& apt-get update && apt-get install -y \
ros-foxy-ros-base \
&& rm -rf /var/lib/apt/lists/*
# Set ROS2 environment variables
ENV ROS_DISTRO=foxy
ENV AMENT_PREFIX_PATH=/opt/ros/foxy
ENV COLCON_PREFIX_PATH=/opt/ros/foxy
ENV LD_LIBRARY_PATH=/opt/ros/foxy/lib
ENV PATH=/opt/ros/foxy/bin:$PATH
ENV PYTHONPATH=/opt/ros/foxy/lib/python3.8/site-packages
ENV ROS_PYTHON_VERSION=3
ENV ROS_VERSION=2
###########################################
# Converter image
###########################################
FROM foxy-base
# Install dependencies for AutoStream converter
RUN apt-get update && apt-get install -y \
wget \
curl \
git \
cmake \
make \
gcc \
g++ \
ros-foxy-lanelet2 \
vim \
bash-completion \
&& rm -rf /var/lib/apt/lists/*
# Copy source files and AutoStreamClient
COPY . /AutoStreamForAutoware
# Set working directory
WORKDIR /AutoStreamForAutoware
# Build
RUN mkdir build \
&& cd build \
&& cmake .. -DAUTOSTREAM_CLIENT_SDK_PATH=/AutoStreamForAutoware/AutoStreamClient \
&& make -j
ENTRYPOINT [ "/AutoStreamForAutoware/build/Application/AutoStreamToLaneletApp" ]