-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Base OS and Heavy tools (experimental) Docker image | ||
|
||
on: | ||
push: | ||
tags: | ||
- bsidf_* | ||
repository_dispatch: | ||
types: [build_base_os_sid_full] | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Docker image to GH | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
|
||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push Docker image | ||
run: | | ||
cd base_os_sid_full | ||
./build.sh | ||
- name: Trigger Base OS full image build | ||
run: | | ||
curl -X POST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/INTI-CMNB/kicad_debian/dispatches --data '{"event_type": "build_sidf"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
FROM ghcr.io/inti-cmnb/base_os_sid:latest | ||
MAINTAINER Salvador E. Tropea <[email protected]> | ||
LABEL Description="Debian with all tools for KiBot (experimental)" | ||
LABEL org.opencontainers.image.description "Debian with all tools for KiBot (experimental)" | ||
|
||
USER root | ||
RUN apt-get update && \ | ||
apt-get -y install --no-install-recommends flake8 \ | ||
python3-pytest python3-pytest-xdist \ | ||
python3-pip python3-wheel python3-setuptools \ | ||
python3-markdown2 \ | ||
diffutils \ | ||
x11-utils fluxbox x11vnc wmctrl \ | ||
unzip \ | ||
zbar-tools \ | ||
procps \ | ||
fonts-dejavu \ | ||
xlsx2csv gnome-themes-extra-data && \ | ||
echo "Pull xdg-utils, but without recommendations" && \ | ||
apt-get -y install pandoc texlive-latex-base texlive-latex-recommended && \ | ||
echo "ODBC support (for KiCad 7+) and GIT LFS" && \ | ||
apt-get -y install libodbc1 libsqliteodbc git-lfs && \ | ||
echo "Install Coveralls helpers (KiBot coverage)" && \ | ||
apt-get -y install curl python3-coverage && \ | ||
dl_deb.py set-soft/coveralls-python && \ | ||
apt-get -y install --no-install-recommends ./*.deb && \ | ||
rm *.deb && \ | ||
apt-get -y autoremove && \ | ||
rm -rf /var/lib/apt/lists/* /var/cache/debconf/templates.dat-old /var/lib/dpkg/status-old | ||
|
||
RUN echo "Install Blender" && \ | ||
apt-get update && \ | ||
apt-get -y install --no-install-recommends xz-utils wget && \ | ||
wget https://mirrors.ocf.berkeley.edu/blender/release/Blender3.5/blender-3.5.1-linux-x64.tar.xz && \ | ||
tar xvf blender-3.5.1-linux-x64.tar.xz --strip-components=1 -C /usr/bin/ && \ | ||
rm blender-3.5.1-linux-x64.tar.xz && \ | ||
apt-get -y remove xz-utils wget && \ | ||
apt-get -y autoremove && \ | ||
rm -rf /var/lib/apt/lists/* /var/cache/debconf/templates.dat-old /var/lib/dpkg/status-old | ||
|
||
RUN echo "Install blender plug-in deps: pillow and skia-python (pip, numpy, etc.)" && \ | ||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ | ||
/usr/bin/3.5/python/bin/python3.10 get-pip.py && \ | ||
/usr/bin/3.5/python/bin/python3.10 -m pip install numpy && \ | ||
/usr/bin/3.5/python/bin/python3.10 -m pip install pillow && \ | ||
/usr/bin/3.5/python/bin/python3.10 -m pip install skia-python && \ | ||
rm -rf get-pip.py && \ | ||
rm -rf /root/.cache/pip/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
set -e | ||
docker build -f Dockerfile -t ghcr.io/inti-cmnb/base_os_full:latest_sid . | ||
TG1=d_sid | ||
TG2=b`docker run --rm ghcr.io/inti-cmnb/base_os_full:latest_sid /bin/bash -c "ls -d /usr/bin/?.? | tr -d '\n' | tail -c 3"` | ||
docker tag ghcr.io/inti-cmnb/base_os_full:latest_sid ghcr.io/inti-cmnb/base_os_full:${TG1}_${TG2} | ||
docker push ghcr.io/inti-cmnb/base_os_full:${TG1}_${TG2} | ||
docker push ghcr.io/inti-cmnb/base_os_full:latest_sid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" \ | ||
ghcr.io/inti-cmnb/base_os_full:latest_sid /bin/bash |