From 5e6c57e78d704a7a86a416e2ad4a408862b9ad5a Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Tue, 11 Jan 2022 14:22:18 -0300 Subject: [PATCH] Added KiCad 6 docker stuff --- README.md | 1 + ki6/Dockerfile | 19 +++++++++++++++++++ ki6/build.sh | 2 ++ ki6/run_kicad_same_user.sh | 13 +++++++++++++ ki6/run_shell_same_user.sh | 13 +++++++++++++ 5 files changed, 48 insertions(+) create mode 100644 ki6/Dockerfile create mode 100755 ki6/build.sh create mode 100755 ki6/run_kicad_same_user.sh create mode 100755 ki6/run_shell_same_user.sh diff --git a/README.md b/README.md index 81e41b3..9837abf 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ The available tags are: * **10.4-5.1.6** is KiCad 5.1.6 on Debian 10.4 with KiBot 0.7.0, kicad-automation-scripts 1.4.2, KiBoM 1.8.0, interactivehtmlbom 2.3.3 and PcbDraw 0.6.0-2 * **10.4-5.1.9** (same as **latest**) is KiCad 5.1.9 on Debian 10.4 with KiBot 0.11.0, KiAuto 1.6.0, KiBoM 1.8.0, interactivehtmlbom 2.4.1 and PcbDraw 0.9.0-1 * **bullseye-6.0.0-RC1-20211204** (same as **nightly**) is KiCad 6.0.0 RC1 (20211204) on Debian bullseye with KiBot 0.11.0, kicad-automation-scripts 1.6.0, KiBoM 1.8.0, interactivehtmlbom 2.4.1 and PcbDraw 0.9.0-1 +* **ki6.0.0_Ubuntu21.10** (same as **ki6**) KiCad 6.0.0 (final release) on is Ubuntu Impish with KiBot 0.11.0, kicad-automation-scripts 1.6.0, KiBoM 1.8.0, interactivehtmlbom 2.4.1 and PcbDraw 0.9.0-1 You can run it using a script like this: diff --git a/ki6/Dockerfile b/ki6/Dockerfile new file mode 100644 index 0000000..610ba87 --- /dev/null +++ b/ki6/Dockerfile @@ -0,0 +1,19 @@ +FROM setsoft/kicad_debian:ki6 +MAINTAINER Salvador E. Tropea +LABEL Description="KiCad with KiBot and other automation scripts" + +RUN sed -i -e's/ main/ main contrib non-free/g' /etc/apt/sources.list && \ + apt-get update && \ + apt-get -y install make wget curl rar bzip2 librsvg2-bin && \ + apt-get -y install --no-install-recommends imagemagick python3-qrcodegen && \ + curl -s https://api.github.com/repos/INTI-CMNB/KiAuto/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \ + curl -s https://api.github.com/repos/INTI-CMNB/KiBoM/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \ + curl -s https://api.github.com/repos/INTI-CMNB/InteractiveHtmlBom/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \ + curl -s https://api.github.com/repos/INTI-CMNB/PcbDraw/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \ + curl -s https://api.github.com/repos/INTI-CMNB/KiCost/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \ + curl -s https://api.github.com/repos/INTI-CMNB/KiBot/releases/latest | grep "browser_download_url.*deb" | cut -d : -f 2,3 | tr -d \" | wget -i - && \ + apt -y install --no-install-recommends ./*.deb && \ + apt-get -y remove curl wget && \ + apt-get -y autoremove && \ + rm /*.deb && \ + rm -rf /var/lib/apt/lists/* diff --git a/ki6/build.sh b/ki6/build.sh new file mode 100755 index 0000000..652d9d7 --- /dev/null +++ b/ki6/build.sh @@ -0,0 +1,2 @@ +#!/bin/sh +docker build -f Dockerfile -t setsoft/kicad_auto:ki6 . diff --git a/ki6/run_kicad_same_user.sh b/ki6/run_kicad_same_user.sh new file mode 100755 index 0000000..5863563 --- /dev/null +++ b/ki6/run_kicad_same_user.sh @@ -0,0 +1,13 @@ +#!/bin/sh +export USER_ID=$(id -u) +export GROUP_ID=$(id -g) +docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \ + --user $USER_ID:$GROUP_ID \ + --env NO_AT_BRIDGE=1 \ + --workdir="/home/$USER" \ + --volume="/etc/group:/etc/group:ro" \ + --volume="/home/$USER:/home/$USER:rw" \ + --volume="/etc/passwd:/etc/passwd:ro" \ + --volume="/etc/shadow:/etc/shadow:ro" \ + --volume="/home/$USER:/home/$USER:rw" \ + setsoft/kicad_auto:ki6 kicad diff --git a/ki6/run_shell_same_user.sh b/ki6/run_shell_same_user.sh new file mode 100755 index 0000000..29b3805 --- /dev/null +++ b/ki6/run_shell_same_user.sh @@ -0,0 +1,13 @@ +#!/bin/sh +export USER_ID=$(id -u) +export GROUP_ID=$(id -g) +docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \ + --user $USER_ID:$GROUP_ID \ + --env NO_AT_BRIDGE=1 \ + --workdir="/home/$USER" \ + --volume="/etc/group:/etc/group:ro" \ + --volume="/home/$USER:/home/$USER:rw" \ + --volume="/etc/passwd:/etc/passwd:ro" \ + --volume="/etc/shadow:/etc/shadow:ro" \ + --volume="/home/$USER:/home/$USER:rw" \ + setsoft/kicad_auto:ki6 /bin/bash