Skip to content
Snippets Groups Projects
Verified Commit 8471aadb authored by Antoine Lima's avatar Antoine Lima
Browse files

Initial commit: dockerfile+compose+readme+CI

parents
No related branches found
No related tags found
No related merge requests found
Pipeline #119091 passed
build:
stage: build
tags:
- docker
image:
name: gcr.io/kaniko-project/executor:v1.9.0-debug
entrypoint: [""]
script:
- echo "'${CI_REGISTRY_IMAGE}' '${CI_PROJECT_DIR}' '${CI_COMMIT_TAG}'"
- /kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}:noetic"
image: docker
services:
docker:dind
update_registry:
stage: build
tags:
- docker
before_script:
- echo $CI_DEPLOY_PASSWORD | docker login $CI_REGISTRY --username $CI_DEPLOY_USER --password-stdin
script:
- docker build --pull -t $CI_REGISTRY/sy31/docker:noetic .
- docker push $CI_REGISTRY/sy31/docker:noetic
FROM ros:noetic-robot
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
nano \
tmux \
ros-noetic-rqt \
ros-noetic-rviz \
ros-noetic-turtlebot3-teleop \
ros-noetic-rqt-common-plugins
# SY31 - Docker image
Docker image fitted with the right packages for SY31 + compose file to run smoothly. Courtesy of @ykumaras & @khimayan.
## Run the image
1. Clone this repository: `git clone https://gitlab.utc.fr/SY31/docker -- sy31-docker`
2. Go inside it `cd sy31-docker`
3. Run `docker-compose up -d` to start the service as detached
4. Run `docker-compose run ros`
## Update the image
A Gitlab CI is setup to build and push an image to [registry.gitlab.utc.fr/sy31/docker](registry.gitlab.utc.fr/sy31/docker) with the lastest `Dockerfile`.
To update the image, simply open a merge request and upon acception, the image will automatically be updated.
version: '2.2'
services:
ros:
# uncomment build and comment image to build directly from Dockerfile
image: registry.gitlab.utc.fr/sy31/docker:noetic
#build: .
network_mode: "host" # Share network with the turtlebot to freely communicate with it
container_name: ros-sy31
volumes:
- ~/sy31_workspace:/home/ws # local_machine_path:container_path
- /tmp/.X11-unix:/tmp/.X11-unix:rw # redirection X11
environment:
- QT_X11_NO_MITSHM=1
- ROS_MASTER_URI=http://192.168.1.1:11311 # Reference turtlebot as the master
- ROS_IP=192.168.1.138 # Adapt to current IP
- TURTLEBOT3_MODEL=burger
- DISPLAY
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment