spiri-sdk/Dockerfile

48 lines
2.0 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 apt-get clean
RUN apt-get update && apt-get upgrade --yes
RUN apt-get install --yes gz-garden
RUN apt-get install --yes ros-noetic-desktop
#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 pip3 install typer-slim loguru sh
RUN apt-get install --yes virtualbox-guest-dkms virtualbox-guest-utils spice-vdagent qemu-guest-agent
RUN apt-get install --yes docker-compose-v2 firefox
#Install our desktop environment last
RUN apt-get install --yes --no-install-recommends lxqt sddm
COPY ./skel/ /opt/spiri-sdk/user-home-skeleton/
RUN cp -r /opt/spiri-sdk/user-home-skeleton/* /etc/skel/
RUN usermod -l spiri -m -d /home/spiri user
RUN echo 'spiri:spiri-friend' | chpasswd
RUN usermod -aG sudo,docker spiri
#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 1000:100 /opt/spiri-sdk