Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
7af3a3491c |
16
Docker/Dockerfile
Normal file
16
Docker/Dockerfile
Normal 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
|
7
Docker/docker-compose.yml
Normal file
7
Docker/docker-compose.yml
Normal file
@ -0,0 +1,7 @@
|
||||
services:
|
||||
build_project:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
volumes:
|
||||
- ./output:/opt/workspace/output
|
5
Docker/readme.md
Normal file
5
Docker/readme.md
Normal 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
6
Docker/run.sh
Normal 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
|
Loading…
x
Reference in New Issue
Block a user