Skip to content
Snippets Groups Projects
Verified Commit 4ecec7ab 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 #119075 failed
image: docker
imagebuild:
stage: build
tags:
- docker
script:
- echo "'$CI_DEPLOY_USER' '$CI_DEPLOY_PASSWORD' '$CI_REGISTRY'"
- docker login -u $CI_DEPLOY_USER -p $CI_DEPLOY_PASSWORD $CI_REGISTRY
- docker build -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.
## 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