Skip to content

Commit

Permalink
Combine all GCS dockerfiles into one dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjong committed Dec 19, 2024
1 parent 575063d commit 5526251
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 306 deletions.
34 changes: 0 additions & 34 deletions ground_control_station/docker/Dockerfile.TAK

This file was deleted.

106 changes: 28 additions & 78 deletions ground_control_station/docker/Dockerfile.gcs
Original file line number Diff line number Diff line change
@@ -1,91 +1,41 @@
FROM osrf/ros:humble-desktop-full

# Set working directory
WORKDIR /root/ros_ws

RUN apt update
# Install dev tools
RUN apt install -y \
# Install system dependencies
RUN apt-get update && apt-get install -y \
vim nano emacs wget curl tree \
iperf3 iftop iputils-ping net-tools htop \
cmake build-essential \
less htop jq \
python3-pip \
tmux \
gdb

# Install any additional ROS2 packages
RUN apt update -y && apt install -y \
ros-dev-tools \
ros-humble-mavros \
ros-humble-tf2* \
ros-humble-stereo-image-proc \
ros-humble-image-view \
ros-humble-topic-tools \
ros-humble-grid-map \
ros-humble-domain-bridge \
ros-humble-ros2cli \
python3-colcon-common-extensions \
libglib2.0-dev \
libcgal-dev \
mosquitto \
mosquitto-clients

# install gstreamer
RUN apt-get update && apt-get install -y \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
gstreamer1.0-tools \
gstreamer1.0-x \
gstreamer1.0-alsa

RUN /opt/ros/humble/lib/mavros/install_geographiclib_datasets.sh

cmake build-essential less htop jq python3-pip tmux gdb \
ros-dev-tools ros-humble-mavros ros-humble-tf2* ros-humble-stereo-image-proc \
ros-humble-image-view ros-humble-topic-tools ros-humble-grid-map \
ros-humble-domain-bridge ros-humble-ros2cli python3-colcon-common-extensions \
libglib2.0-dev libcgal-dev mosquitto mosquitto-clients \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools \
gstreamer1.0-x gstreamer1.0-alsa openssh-server

# Install Python dependencies
RUN pip3 install \
empy \
future \
lxml \
matplotlib \
numpy \
pkgconfig \
psutil \
pygments \
wheel \
pymavlink \
pyyaml \
requests \
setuptools \
six \
toml \
scipy \
pytak \
paho-mqtt

RUN pip3 install empy future lxml matplotlib numpy pkgconfig psutil pygments \
wheel pymavlink pyyaml requests setuptools six toml scipy pytak paho-mqtt

# Add ability to SSH
RUN apt-get update && apt-get install -y openssh-server
RUN mkdir /var/run/sshd

# Password is airstack
RUN echo 'root:airstack' | chpasswd
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
# Configure SSH
RUN mkdir /var/run/sshd && echo 'root:airstack' | chpasswd && \
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config && \
sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd

EXPOSE 22



# Cleanup. Prevent people accidentally doing git commits as root in Docker
RUN apt purge git -y \
&& apt autoremove -y \
&& apt clean -y \
&& rm -rf /var/lib/apt/lists/*
# Build ROS2 workspace
# COPY ground_control_station/ros_ws/src/ros2tak_tools /root/ros_ws/src/ros2tak_tools
# COPY common/ros_packages/airstack_msgs /root/ros_ws/src/airstack_msgs
# RUN /bin/bash -c "source /opt/ros/humble/setup.bash && \
# colcon build --symlink-install --packages-select airstack_msgs && \
# colcon build --symlink-install"

# Cleanup
RUN apt purge git -y && apt autoremove -y && apt clean -y && rm -rf /var/lib/apt/lists/*
72 changes: 0 additions & 72 deletions ground_control_station/docker/Dockerfile.gst-ros-bridge

This file was deleted.

37 changes: 0 additions & 37 deletions ground_control_station/docker/Dockerfile.ros2casevac_agent

This file was deleted.

30 changes: 0 additions & 30 deletions ground_control_station/docker/Dockerfile.ros2tak_tools

This file was deleted.

12 changes: 0 additions & 12 deletions ground_control_station/docker/Dockerfile.tak_publisher

This file was deleted.

12 changes: 0 additions & 12 deletions ground_control_station/docker/Dockerfile.tak_subscriber

This file was deleted.

2 changes: 1 addition & 1 deletion ground_control_station/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
ground-control-station:
image: &gcs_image ${PROJECT_DOCKER_REGISTRY}/${PROJECT_NAME}:v${PROJECT_VERSION}_gcs-dev-console
image: &gcs_image ${PROJECT_DOCKER_REGISTRY}/${PROJECT_NAME}:v${PROJECT_VERSION}_gcs
build:
context: ../
dockerfile: docker/Dockerfile.gcs
Expand Down
Loading

0 comments on commit 5526251

Please sign in to comment.