File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Dockerfile to create linuxCNC build container
2+ # To run it locally:
3+ # docker build --build-arg BASE_IMAGE=debian:trixie -f .github/docker/Dockerfile -t build-container .
4+
15ARG BASE_IMAGE
26
37FROM $BASE_IMAGE
48
59# Install base dependencys
610RUN apt-get update
7- RUN apt-get install -y devscripts equivs build-essential lintian clang git lsb-release python3 gpg sudo xauth --no-install-recommends
11+ RUN apt-get install -y devscripts equivs build-essential lintian clang git lsb-release python3 gpg sudo xauth --no-install-recommends && \
12+ apt-get clean
813
914# Install linuxcnc dependencys
10- # We need only the debian folder which is copyed to .github/docker/ in ci
11- RUN --mount=type=bind,target=/linuxcnc-src/debian,source=./debian,rw \
15+ RUN --mount=type=bind,source=.,target=/linuxcnc-src,rw \
1216 cd linuxcnc-src && \
1317 debian/configure && \
14- apt-get build-dep -y .
18+ apt-get build-dep -y . && \
19+ apt-get clean
1520
1621# Cleanup
17- RUN apt-get clean && \
18- rm -rf /var/lib/apt/lists/* && \
19- rm -rf linuxcnc-src
22+ RUN rm -rf linuxcnc-src
2023
21- # Add a user for linuxcnc with sudo nopasswd and set it as user
24+ # Add a user for linuxcnc with sudo nopasswd
2225RUN useradd -ms /bin/bash linuxcnc && \
2326 echo "linuxcnc ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/linuxcnc-nopasswd
Original file line number Diff line number Diff line change 4040 with :
4141 submodules : false
4242 fetch-depth : 1
43- - name : Copy debian folder to docker
44- run : |
45- cp -r debian .github/docker/
4643 - name : Set up Docker buildx
4744 uses : docker/setup-buildx-action@v4
4845 - name : Log in to the Container registry
5451 - name : Build and push Docker image
5552 uses : docker/build-push-action@v7
5653 with :
57- context : .github/docker
54+ context : .
55+ file : .github/docker/Dockerfile
5856 build-args : |
5957 BASE_IMAGE=debian:${{ matrix.debian_version }}
6058 push : true
You can’t perform that action at this time.
0 commit comments