spiri-sdk/Dockerfile

61 lines
2.5 KiB
Docker

FROM px4io/px4-dev-simulation-focal
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
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 -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -'
RUN sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
RUN sh -c "wget https://packages.osrfoundation.org/gazebo.key -O - | apt-key add -"
RUN apt-get clean
RUN apt-get update && apt-get upgrade --yes
#RUN apt-get install --yes gz-garden
RUN apt-get remove gz-garden
RUN apt-get install --yes ros-noetic-desktop gazebo11 libgazebo11 libgazebo11-dev
#Install ROS
WORKDIR /opt/spiri-sdk
RUN git clone --depth 1 -b v1.15.0-beta1 https://github.com/PX4/PX4-Autopilot.git --recursive
WORKDIR /opt/spiri-sdk/PX4-Autopilot/
#Precompile px4
#RUN make px4_sitl_default
RUN DONT_RUN=1 make px4_sitl gazebo-classic
RUN pip3 install typer-slim loguru sh
#Remove the ubuntu GUI and replace it with lxqt
RUN apt-get purge ubuntu-desktop gdm3 mutter --yes
RUN apt-get install --yes virtualbox-guest-dkms virtualbox-guest-utils spice-vdagent qemu-guest-agent
RUN apt-get install --yes docker-compose-v2
#Install our desktop environment last
RUN apt-get install --yes lxqt sddm firefox
COPY ./skel/ /opt/spiri-sdk/user-home-skeleton/
RUN cp -r /opt/spiri-sdk/user-home-skeleton/* /etc/skel/
RUN usermod -u 1000 -l spiri -m -d /home/spiri user
RUN echo 'spiri:spiri-friend' | chpasswd
RUN usermod -aG sudo,docker spiri
USER spiri
RUN cp -r /opt/spiri-sdk/user-home-skeleton/* /home/spiri/
USER root
#Install vscodium, a vscode fork with no telemetry and a worse package store
# RUN sh -c "curl -fSsL https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | sudo gpg --dearmor | sudo tee /usr/share/keyrings/vscodium.gpg > /dev/null"
# RUN "echo deb [signed-by=/usr/share/keyrings/vscodium.gpg] https://download.vscodium.com/debs vscodium main | sudo tee /etc/apt/sources.list.d/vscodium.list"
# RUN apt update
# RUN apt install codium --yes
#This should be the first real user created and the `users` group on most linux distros
RUN chown -R spiri:100 /opt/spiri-sdk