Compare commits

..

1 Commits

Author SHA1 Message Date
7af3a3491c Build in docker 2022-02-17 14:16:05 +01:00
4 changed files with 34 additions and 0 deletions

16
Docker/Dockerfile Normal file
View File

@ -0,0 +1,16 @@
FROM ubuntu
COPY ./run.sh /opt/workspace/
RUN apt update
RUN apt install git python3-pip -y
RUN pip3 install platformio
RUN mkdir -p /opt/workspace
RUN git clone https://gitea.philsson.com/philip/Hexapod.git /opt/workspace/Hexapod
WORKDIR /opt/workspace/Hexapod
RUN mv include/settings.h.orig include/settings.h; mv include/config.h.orig include/config.h
RUN pio run -e featheresp32
RUN chmod +x /opt/workspace/run.sh;
CMD /opt/workspace/run.sh

View File

@ -0,0 +1,7 @@
services:
build_project:
build:
context: .
dockerfile: Dockerfile
volumes:
- ./output:/opt/workspace/output

5
Docker/readme.md Normal file
View File

@ -0,0 +1,5 @@
# Build in Docker
Run the following command from this folder
```bash
docker-compose up build_project
```

6
Docker/run.sh Normal file
View File

@ -0,0 +1,6 @@
if [ -d "/opt/workspace/output" ]; then
echo "Exporting bin file to /opt/workspace/output..."
cp /opt/workspace/Hexapod/.pio/build/featheresp32/firmware.elf /opt/workspace/output/firmware.elf
else
echo "No output folder exists"
fi