Skip to content

Commit

Permalink
Docker: do not copy folder into image and simplify command
Browse files Browse the repository at this point in the history
The image should not contain the code, only the programs needed to
build. This ensures only one image is build.
  • Loading branch information
wutje committed Dec 26, 2023
1 parent ab61c4e commit 54be660
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@ RUN pacman -Syyu git --noconfirm
RUN pacman -Syyu python-pip --noconfirm
RUN pacman -Syyu python-crcmod --noconfirm
WORKDIR /app
COPY . .

RUN git submodule update --init --recursive
#RUN make && cp firmware* compiled-firmware/
4 changes: 2 additions & 2 deletions compile-with-docker.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@echo off
docker build -t uvk5 .
docker run --rm -v %CD%\compiled-firmware:/app/compiled-firmware uvk5 /bin/bash -c "cd /app && make clean && make && cp firmware* compiled-firmware/"
pause
docker run --rm -v %CD%:/app/ uvk5 /bin/bash -c "make clean && make -j2"
pause
2 changes: 1 addition & 1 deletion compile-with-docker.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
docker build -t uvk5 .
docker run --rm -v ${PWD}/compiled-firmware:/app/compiled-firmware uvk5 /bin/bash -c "cd /app && make && cp firmware* compiled-firmware/"
docker run --rm -v ${PWD}:/app/ uvk5 /bin/bash -c "make clean && make -j2"

0 comments on commit 54be660

Please sign in to comment.