2024-05-09 13:00:38 -03:00
FROM px4io/px4-dev-simulation-focal
2024-01-22 15:42:59 -04:00
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
2024-06-05 08:40:30 -03:00
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 -'
2024-06-19 12:08:03 -03:00
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 -"
2024-06-05 08:40:30 -03:00
RUN apt-get clean
2024-05-09 13:00:38 -03:00
RUN apt-get update && apt-get upgrade --yes
2024-06-19 12:08:03 -03:00
#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
2024-06-05 08:40:30 -03:00
#Install ROS
2024-05-09 13:00:38 -03:00
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/
2024-05-31 11:58:09 -03:00
#Precompile px4
2024-06-19 12:08:03 -03:00
#RUN make px4_sitl_default
RUN DONT_RUN = 1 make px4_sitl gazebo-classic
2024-05-31 11:58:09 -03:00
RUN pip3 install typer-slim loguru sh
2024-01-23 15:06:29 -04:00
2024-06-18 14:03:12 -03:00
#Remove the ubuntu GUI and replace it with lxqt
2024-06-18 15:09:29 -03:00
RUN apt-get purge ubuntu-desktop gdm3 mutter --yes
2024-06-18 14:03:12 -03:00
RUN apt-get install --yes virtualbox-guest-dkms virtualbox-guest-utils spice-vdagent qemu-guest-agent
2024-06-18 12:03:59 -03:00
RUN apt-get install --yes docker-compose-v2
2024-06-18 14:03:12 -03:00
2024-05-09 13:00:38 -03:00
#Install our desktop environment last
2024-06-18 14:03:12 -03:00
RUN apt-get install --yes lxqt sddm firefox
2024-05-28 14:30:18 -03:00
COPY ./skel/ /opt/spiri-sdk/user-home-skeleton/
RUN cp -r /opt/spiri-sdk/user-home-skeleton/* /etc/skel/
2024-05-21 15:09:07 -03:00
2024-06-18 15:09:29 -03:00
RUN usermod -u 1000 -l spiri -m -d /home/spiri user
2024-05-31 11:58:09 -03:00
RUN echo 'spiri:spiri-friend' | chpasswd
2024-05-28 14:30:18 -03:00
RUN usermod -aG sudo,docker spiri
2024-06-18 15:09:29 -03:00
USER spiri
RUN cp -r /opt/spiri-sdk/user-home-skeleton/* /home/spiri/
USER root
2024-05-28 14:30:18 -03:00
#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
2024-06-18 15:09:29 -03:00
RUN chown -R spiri:100 /opt/spiri-sdk