Skip to content

Commit

Permalink
Merge dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
dave992 committed Nov 22, 2024
1 parent f9801c0 commit 83203d2
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 170 deletions.
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 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 scancontrol:humble-ros-base
```

## Bugs & Feature Requests

Expand Down

0 comments on commit 83203d2

Please sign in to comment.