76 lines
3.4 KiB
Docker
76 lines
3.4 KiB
Docker
FROM nestybox/ubuntu-focal-systemd
|
|
|
|
ENV ROS_DISTRO noetic
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
RUN apt-get update
|
|
RUN apt-get install curl gnupg2 software-properties-common -y
|
|
|
|
RUN sh -c 'curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -'
|
|
RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
|
|
RUN sh -c 'curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -'
|
|
RUN sh -c 'add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"'
|
|
# RUN add-apt-repository ppa:flatpak/stable
|
|
|
|
#Make sure we're running latest gazebo11, since px4io/px4-dev-ros-noetic does.
|
|
RUN sh -c "curl -sSL http://get.gazebosim.org | sh"
|
|
|
|
RUN apt-get update
|
|
RUN apt-get install ros-$ROS_DISTRO-desktop-full -y
|
|
RUN apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
|
|
RUN apt-get install ros-$ROS_DISTRO-gazebo-ros-pkgs ros-$ROS_DISTRO-gazebo-ros-control gazebo11 -y
|
|
RUN apt-get install ros-$ROS_DISTRO-mavros -y
|
|
RUN apt-get install lxqt-core -y
|
|
RUN apt-get install vim nano htop git -y
|
|
# RUN apt-get install flatpak xdg-desktop-portal-kde -y
|
|
# RUN flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
|
# RUN flatpak install flathub org.mozilla.firefox
|
|
|
|
RUN apt-get remove gnome-shell -y
|
|
RUN apt-get autoremove -y
|
|
|
|
RUN wget https://github.com/kasmtech/KasmVNC/releases/download/v1.2.0/kasmvncserver_focal_1.2.0_amd64.deb
|
|
RUN apt-get install ./kasmvncserver_focal_1.2.0_amd64.deb --yes
|
|
RUN rm ./kasmvncserver_focal_1.2.0_amd64.deb
|
|
|
|
COPY ./kasmvnc.yaml /etc/kasmvnc/kasmvnc.yaml
|
|
COPY ./kasmvnc.service /etc/systemd/system/
|
|
RUN systemctl enable kasmvnc
|
|
|
|
#Custom user skel overrides. We're not going to be too worried about permissions for this one.
|
|
COPY ./skel /etc/skel/
|
|
|
|
#Delete default user and replace it with our own
|
|
RUN userdel -r admin
|
|
|
|
ARG USERNAME=spiri
|
|
ARG USER_UID=1000
|
|
ARG USER_GID=$USER_UID
|
|
|
|
RUN groupadd --gid $USER_GID $USERNAME
|
|
RUN useradd --uid $USER_UID --gid $USER_GID --create-home --shell /bin/bash $USERNAME
|
|
RUN usermod -aG sudo,ssl-cert $USERNAME
|
|
RUN echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/$USERNAME
|
|
RUN chmod 0440 /etc/sudoers.d/$USERNAME
|
|
RUN echo "${USERNAME}:spiri-friend" | chpasswd
|
|
|
|
COPY --chown=$USER_UID:$USER_GID ./kasmpasswd /home/$USERNAME/.kasmpasswd
|
|
COPY --chown=$USER_UID:$USER_GID --chmod=0755 ./xstartup /home/$USERNAME/.vnc/xstartup
|
|
|
|
COPY ./background.png /opt/spiri-wallpaper.png
|
|
run sed -i 's|/usr/share/lxqt/themes/debian/wallpaper.svg|/opt/spiri-wallpaper.png|' /etc/xdg/pcmanfm-qt/lxqt/settings.conf
|
|
#Remove transparency it can make lead to compression artifacts
|
|
run sed -i 's|TerminalTransparency=10|/TerminalTransparency=0|' /etc/xdg/qterminal.org/qterminal.ini
|
|
|
|
#Copy in our custom gazebo resources
|
|
COPY --link --from=git.spirirobotics.com/spiri/gazebo-resources:latest /models /usr/share/gazebo-11/models/
|
|
COPY --link --from=git.spirirobotics.com/spiri/gazebo-resources:latest /worlds /usr/share/gazebo-11/worlds/
|
|
COPY --link --from=git.spirirobotics.com/spiri/gazebo-resources:latest /plugins /usr/lib/x86_64-linux-gnu/gazebo-11/plugins
|
|
|
|
# USER $USERNAME
|
|
# #Install nix, for easy mixin packages. Homebrew would also work...
|
|
# RUN curl -L https://nixos.org/nix/install | sh -s -- --no-daemon
|
|
# COPY ./nix.conf /etc/nix/nix.conf
|
|
# # RUN nix flake init
|
|
# USER 0
|