-
Notifications
You must be signed in to change notification settings - Fork 24
/
Dockerfile.foxy
52 lines (39 loc) · 1.64 KB
/
Dockerfile.foxy
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
FROM ros:foxy
SHELL ["/bin/bash", "-c"]
COPY . /opt/package
WORKDIR /opt/package
RUN (apt-get update || true) && apt-get install --no-install-recommends --yes curl
RUN curl --fail --show-error --silent --location https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -
# install packages
RUN apt-get update && apt-get upgrade -y && apt-get install -q -y \
bash-completion \
dirmngr \
gnupg2 \
python3-pip \
python3-apt \
wget \
enchant \
sudo \
wget
RUN wget http://packages.osrfoundation.org/gazebo.key -O - | apt-key add - && \
echo "yaml https://s3-us-west-2.amazonaws.com/rosdep/base.yaml" > /etc/ros/rosdep/sources.list.d/19-aws-sdk.list
RUN useradd builduser
RUN adduser builduser sudo
RUN mkdir -p /home/builduser
RUN chown builduser /home/builduser
RUN sh -c "echo 'builduser ALL=NOPASSWD: ALL' >> /etc/sudoers"
# NOTE: This is a workaround for setuptools 50.* (see https://github.com/pypa/setuptools/issues/2352)
ENV SETUPTOOLS_USE_DISTUTILS=stdlib
RUN pip3 install --upgrade pip setuptools
# RUN pip3 install -r requirements.txt
RUN pip3 install -U pytest colcon-common-extensions
ARG CACHE_DATE=not_a_date
RUN pip3 install git+https://github.com/colcon/colcon-ros-bundle.git
RUN pip3 install -e .
WORKDIR /opt/package/integration/ros2_workspace
RUN chown -R builduser /opt/package
USER builduser
RUN source /opt/ros/foxy/setup.sh; rosdep update && \
sudo rosdep install --from-paths /opt/package/integration/ros2_workspace --rosdistro foxy --ignore-src -r -y
RUN source /opt/ros/foxy/setup.sh; colcon build
RUN source /opt/ros/foxy/setup.sh; colcon bundle --bundle-version 2 --bundle-base v2