Skip to content

Commit

Permalink
set default arg in Dockerfile for multiple stages
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbusch committed Jun 16, 2023
1 parent 4894a03 commit c23810a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
docker-ros:
runs-on: ubuntu-latest
steps:
- uses: ika-rwth-aachen/docker-ros@v1.1.0
- uses: ika-rwth-aachen/docker-ros@v1.2.0
with:
base-image: rwthika/ros2:humble
command: ros2 run my_pkg my_node
Expand All @@ -110,7 +110,7 @@ jobs:
```yml
include:
- remote: https://raw.githubusercontent.com/ika-rwth-aachen/docker-ros/v1.1.0/.gitlab-ci/docker-ros.yml
- remote: https://raw.githubusercontent.com/ika-rwth-aachen/docker-ros/v1.2.0/.gitlab-ci/docker-ros.yml

variables:
BASE_IMAGE: rwthika/ros2:humble
Expand All @@ -129,7 +129,7 @@ jobs:
docker-ros:
runs-on: ubuntu-latest
steps:
- uses: ika-rwth-aachen/docker-ros@v1.1.0
- uses: ika-rwth-aachen/docker-ros@v1.2.0
with:
base-image: rwthika/ros2:humble
command: ros2 run my_pkg my_node
Expand All @@ -142,7 +142,7 @@ jobs:
```yml
include:
- remote: https://raw.githubusercontent.com/ika-rwth-aachen/docker-ros/v1.1.0/.gitlab-ci/docker-ros.yml
- remote: https://raw.githubusercontent.com/ika-rwth-aachen/docker-ros/v1.2.0/.gitlab-ci/docker-ros.yml

variables:
BASE_IMAGE: rwthika/ros2:humble
Expand All @@ -162,7 +162,7 @@ jobs:
docker-ros:
runs-on: ubuntu-latest
steps:
- uses: ika-rwth-aachen/docker-ros@v1.1.0
- uses: ika-rwth-aachen/docker-ros@v1.2.0
with:
base-image: rwthika/ros2:humble
command: ros2 run my_pkg my_node
Expand All @@ -176,7 +176,7 @@ jobs:
```yml
include:
- remote: https://raw.githubusercontent.com/ika-rwth-aachen/docker-ros/v1.1.0/.gitlab-ci/docker-ros.yml
- remote: https://raw.githubusercontent.com/ika-rwth-aachen/docker-ros/v1.2.0/.gitlab-ci/docker-ros.yml

variables:
BASE_IMAGE: rwthika/ros2:humble
Expand All @@ -197,7 +197,7 @@ jobs:
docker-ros:
runs-on: ubuntu-latest
steps:
- uses: ika-rwth-aachen/docker-ros@v1.1.0
- uses: ika-rwth-aachen/docker-ros@v1.2.0
with:
base-image: rwthika/ros2:humble
command: ros2 run my_pkg my_node
Expand All @@ -210,7 +210,7 @@ jobs:
```yml
include:
- remote: https://raw.githubusercontent.com/ika-rwth-aachen/docker-ros/v1.1.0/.gitlab-ci/docker-ros.yml
- remote: https://raw.githubusercontent.com/ika-rwth-aachen/docker-ros/v1.2.0/.gitlab-ci/docker-ros.yml

variables:
BASE_IMAGE: rwthika/ros2:humble
Expand All @@ -234,7 +234,7 @@ jobs:
platform: [amd64, arm64]
runs-on: [self-hosted, "${{ matrix.platform }}"]
steps:
- uses: ika-rwth-aachen/docker-ros@v1.1.0
- uses: ika-rwth-aachen/docker-ros@v1.2.0
with:
base-image: rwthika/ros2:humble
command: ros2 run my_pkg my_node
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# copy contents of files-folder into image
ARG ADDITIONAL_FILES_DIR
ARG ADDITIONAL_FILES_DIR="docker/additional-files"
ADD ${ADDITIONAL_FILES_DIR}* /docker-ros/additional-files/
# install essential build tools and dependencies for install script
Expand Down
14 changes: 11 additions & 3 deletions templates/docker-compose.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ x-build: &build
args:
BASE_IMAGE: *base-image
COMMAND: *command
ADDITIONAL_DEBS_FILE: $ADDITIONAL_DEBS_FILE
ADDITIONAL_FILES_DIR: $ADDITIONAL_FILES_DIR
ADDITIONAL_PIP_FILE: $ADDITIONAL_PIP_FILE
CUSTOM_SCRIPT_FILE: $CUSTOM_SCRIPT_FILE
ENABLE_RECURSIVE_ADDITIONAL_DEBS: $ENABLE_RECURSIVE_ADDITIONAL_DEBS
ENABLE_RECURSIVE_ADDITIONAL_PIP: $ENABLE_RECURSIVE_ADDITIONAL_PIP
ENABLE_RECURSIVE_CUSTOM_SCRIPT: $ENABLE_RECURSIVE_CUSTOM_SCRIPT
GIT_HTTPS_PASSWORD: $GIT_HTTPS_PASSWORD
GIT_HTTPS_SERVER: $GIT_HTTPS_SERVER
GIT_HTTPS_USER: $GIT_HTTPS_USER
GIT_HTTPS_PASSWORD: $GIT_HTTPS_PASSWORD
GIT_SSH_PRIVATE_KEY: $GIT_SSH_PRIVATE_KEY
GIT_SSH_KNOWN_HOST_KEYS: $GIT_SSH_KNOWN_HOST_KEYS
GIT_SSH_PRIVATE_KEY: $GIT_SSH_PRIVATE_KEY
ROS_DISTRO: $ROS_DISTRO

services:
dev:
Expand All @@ -27,4 +35,4 @@ services:
image: *run-image
build:
target: run
<<: *build
<<: *build

0 comments on commit c23810a

Please sign in to comment.