Skip to content

Commit 5c5ddb6

Browse files
committed
ci: No need to copy / fixes
1 parent e537e0e commit 5c5ddb6

2 files changed

Lines changed: 13 additions & 12 deletions

File tree

.github/docker/Dockerfile

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
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+
15
ARG BASE_IMAGE
26

37
FROM $BASE_IMAGE
48

59
#Install base dependencys
610
RUN 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
2225
RUN useradd -ms /bin/bash linuxcnc && \
2326
echo "linuxcnc ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/linuxcnc-nopasswd

.github/workflows/docker.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ jobs:
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
@@ -54,7 +51,8 @@ jobs:
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

0 commit comments

Comments
 (0)