Skip to content
Snippets Groups Projects
Commit 809493cd authored by Ryan Lewis's avatar Ryan Lewis
Browse files

Cleanup

parent 5e9d2fce
No related branches found
No related tags found
No related merge requests found
CONTAINER_USER=$USER
DOCKER_NAMESPACE=luckierdodge
CONTAINER_NAME=rob530_dev
USER_ID=$UID
IMAGE=$DOCKER_NAMESPACE/$CONTAINER_NAME:latest
ARG BASE_IMAGE=osrf/ros:noetic-desktop
# Install dev packages
FROM $BASE_IMAGE as base
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
git \
git-lfs \
tmux \
curl \
wget \
vim \
sudo \
unzip \
python3-pip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install ROS Packages
RUN apt-get update && apt-get install -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install pip3 packages
RUN pip3 install numpy scipy pyyaml matplotlib sympy tk
CMD ["bash"]
# ROB 530 Project Development Docker Container
Container that bundles ROS 1's Noetic release, with the full desktop install and all dependencies needed for development.
This setup assumes:
1. A *Nix like environment (Linux, WSL2 if using Windows, or Mac (untested))
1. Docker is installed and configured. See [https://docs.docker.com/get-docker/](https://docs.docker.com/get-docker/). On Windows, ensure that you've enabled the WSL integration for Docker (Settings->Resources->WSL Integration)
## Steps to use:
1. Edit `./.env` and modify any variables
1. Run `./launch.sh` to start the docker container. You should find yourself in a docker container with ROS Noetic installed. Run `env | grep ROS` to make sure everything is configured properly
1. If you want to attach to a running `rob530_dev` container, simply run `./attach.sh` from another terminal
#! /bin/bash
# Copyright (c) 2019 Javier Peralta Saenz, Ariel Mora Jimenez.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Modified by Ryan D. Lewis
# Script Configuration
source .env
sudo docker exec -it \
--user=$USER_ID \
$CONTAINER_NAME bash -c "source /opt/ros/foxy/setup.bash && bash"\
#! /bin/bash
#Script Configuration
source .env
docker build -t $IMAGE .
#! /bin/bash
# Copyright (c) 2019 Javier Peralta Saenz, Ariel Mora Jimenez.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Modified by Ryan D. Lewis
# Script Configuration
source .env
docker run -it --rm \
--name $CONTAINER_NAME \
--user=$USER_ID\
--net=host \
--env="DISPLAY" \
--env="CONTAINER_NAME=$CONTAINER_NAME" \
--workdir="/home/$CONTAINER_USER" \
--volume="/home/$CONTAINER_USER:/home/$CONTAINER_USER" \
--volume="/etc/group:/etc/group:ro" \
--volume="/etc/passwd:/etc/passwd:ro" \
--volume="/etc/shadow:/etc/shadow:ro" \
--volume="/etc/sudoers.d:/etc/sudoers.d:ro" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
$IMAGE bash\
#! /bin/bash
#Script Configuration
source .env
docker pull $IMAGE
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