Skip to content

Commit

Permalink
Merge pull request #27 from sgvandijk/enhance-docker-build
Browse files Browse the repository at this point in the history
Enhance docker build
  • Loading branch information
sgvandijk authored Apr 8, 2021
2 parents 329c03c + bc9b045 commit 93b4651
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
13 changes: 7 additions & 6 deletions installation/cross_compile/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
FROM ubuntu:18.04

# Install dependencies
RUN apt-get update
RUN apt-get install -y \
RUN apt-get update && apt-get install -y \
wget \
tar \
python3-pip \
Expand All @@ -11,7 +10,8 @@ RUN apt-get install -y \
qemu-user-static \
python3-numpy \
sshfs \
rsync
rsync \
&& rm -rf /var/lib/apt/lists/*
RUN echo user_allow_other >> /etc/fuse.conf

# Add user
Expand All @@ -21,7 +21,7 @@ RUN usermod -aG sudo develop

# ROS2 developmnet dependencies
USER develop
RUN pip3 install \
RUN pip3 install --no-cache-dir \
rosinstall_generator \
colcon-common-extensions \
vcstool \
Expand All @@ -31,8 +31,9 @@ ENV PATH=/home/develop/.local/bin/:$PATH
# Install compiler
USER root
WORKDIR /tmp
RUN wget https://github.com/Pro/raspi-toolchain/releases/latest/download/raspi-toolchain.tar.gz
RUN tar xfz raspi-toolchain.tar.gz --strip-components=1 -C /opt
RUN wget https://github.com/Pro/raspi-toolchain/releases/latest/download/raspi-toolchain.tar.gz \
&& tar xfz raspi-toolchain.tar.gz --strip-components=1 -C /opt \
&& rm raspi-toolchain.tar.gz

# Prepare workspace
USER develop
Expand Down
3 changes: 3 additions & 0 deletions installation/cross_compile/start_docker.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/bin/bash

set -e

if [ ! -d "./ros2_ws" ]; then
mkdir -p ./ros2_ws
chmod 777 ./ros2_ws
fi
touch ./ros2_ws/.dockerignore

if [ ! -d "./rootfs" ]; then
mkdir -p ./rootfs
Expand Down

0 comments on commit 93b4651

Please sign in to comment.