Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge dockerfiles #45

Open
wants to merge 2 commits into
base: ros2-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions .docker/Dockerfile.CI → .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
ARG SCANCONTROL_SDK_VERSION=1.0.0

################################################################################
# Build .deb packages for Aravis and scanCONTROL SDK
################################################################################
FROM ubuntu:22.04 AS build

ARG SCANCONTROL_SDK_VERSION
Expand Down Expand Up @@ -67,12 +70,16 @@ RUN mkdir /library_pkgs && \
mv "/scanCONTROL-Linux-SDK/libmescan/builddir/mescan_${SCANCONTROL_SDK_VERSION}-1_amd64.deb" /library_pkgs && \
mv "/scanCONTROL-Linux-SDK/libllt/builddir/llt_${SCANCONTROL_SDK_VERSION}-1_amd64.deb" /library_pkgs

FROM ros:humble-ros-core
################################################################################
# ros-core and Aravis + scanCONTROL SDK
# for use with CI
################################################################################
FROM ros:humble-ros-core AS scancontrol-core
ARG SCANCONTROL_SDK_VERSION

RUN apt-get update && apt-get install -y --no-install-recommends\
build-essential \
pkg-config \
build-essential \
pkg-config \
&& rm -rf /var/lib/apt/lists/*

COPY --from=build ["/library_pkgs", "/library_pkgs"]
Expand All @@ -83,3 +90,17 @@ RUN apt-get update && \
apt install /library_pkgs/llt_${SCANCONTROL_SDK_VERSION}-1_amd64.deb \
&& rm -rf /var/lib/apt/lists/*

################################################################################
# ros-base + Aravis + scanCONTROL SDK + RViz2
# for use as a base image in development or deployment
################################################################################
FROM scancontrol-core AS scancontrol-base

ARG DEBIAN_FRONTEND=noninteractive

# Install the base release + rviz2
RUN apt-get update && apt-get install -y --no-install-recommends \
ros-humble-ros-base \
ros-humble-rviz2 \
ros-humble-rviz-default-plugins \
&& rm -rf /var/lib/apt/lists/*
166 changes: 0 additions & 166 deletions .docker/Dockerfile.dev

This file was deleted.

2 changes: 1 addition & 1 deletion .docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
container_name: scancontrol-container
build:
context: .
dockerfile: Dockerfile.dev
dockerfile: Dockerfile
user: ros
working_dir: /home/ros/workspace
# command: >
Expand Down
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,31 @@ The following parameters are available to allow using multiple scanCONTROL devic

Encapsulates the same driver class as the scancontrol_driver_node, but instead allows for zero-copy data transfer. The Topics, services and paremeters are the same as described for the scancontrol_driver_node above.

## Docker Images

This repository provides a `Dockerfile` (in the `.docker` folder) with multiple stages for images with Aravis and the scanCONTROL SDK installed.

### scancontrol-core
Extends: `[ros-humble-ros-core]`

- Installed Aravis.
- Installed scanCONTROL SDK.

```bash
cd .docker
docker build . --target scancontrol-core -t samxl/scancontrol:humble-ros-core
```

### scancontrol-base
Extends: `[scancontrol-core]`

- Installed `ros-humble-ros-base`
- Installed `rviz2`.

```bash
cd .docker
docker build . --target scancontrol-base -t samxl/scancontrol:humble-ros-base
```

## Bugs & Feature Requests

Expand Down
Loading