Skip to content

Commit

Permalink
Publish image of ISAR with turtlebot
Browse files Browse the repository at this point in the history
  • Loading branch information
aeshub committed Sep 20, 2022
1 parent 295f6d7 commit 808df55
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 4 deletions.
38 changes: 36 additions & 2 deletions .github/workflows/publish_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ name: Create and publish a Docker image
on:
release:
types: [published]
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
build-and-push-simulator:
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -39,12 +40,45 @@ jobs:
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-simulator

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
file: Dockerfile.Simulator
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

build-and-push-isar-with-turtlebot:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile.Isar
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
10 changes: 10 additions & 0 deletions Dockerfile.Isar
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM ghcr.io/equinor/isar:latest

ARG ROBOT_REPOSITORY_CLONE_URL=https://github.com/equinor/isar-turtlebot.git

RUN pip install git+${ROBOT_REPOSITORY_CLONE_URL}@main

RUN useradd -ms /bin/bash --uid 1001 isar
RUN chown -R 1001 /app
RUN chmod 755 /app
USER 1001
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ docker-compose up --build

The simulation world that is used can be set by changing the world variable in the 'entrypoint.sh' file.

Additional settings, such as using Nvidia GPU or gamepad input to the docker container is included via separate .yml-files. To run the docker container with these settings the corresponding `docker-compose-setting.yml` file must be spesified together with the main `docker-compose.yml` file. Several setting files can be included.
Additional settings, such as using Nvidia GPU or gamepad input to the docker container is included via separate .yml-files. To run the docker container with these settings the corresponding `docker-compose-setting.yml` file must be specified together with the main `docker-compose.yml` file. Several setting files can be included.

```bash
docker-compose -f docker-compose.yml -f docker-compose-setting.yml up --build
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
container_name: turtle_sim
build:
context: ./
dockerfile: Dockerfile
dockerfile: Dockerfile.Simulator
ports:
- "9090:9090"
- "5000:5000"
Expand Down

0 comments on commit 808df55

Please sign in to comment.