Created Project Environment
This commit is contained in:
parent
94bc26c5ea
commit
fdfa49fd36
6 changed files with 47 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -14,3 +14,5 @@ Cargo.lock
|
||||||
# MSVC Windows builds of rustc generate these, which store debugging information
|
# MSVC Windows builds of rustc generate these, which store debugging information
|
||||||
*.pdb
|
*.pdb
|
||||||
|
|
||||||
|
# Executables
|
||||||
|
**.fap
|
||||||
|
|
0
build/.empty
Normal file
0
build/.empty
Normal file
26
docker/Dockerfile
Normal file
26
docker/Dockerfile
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# BACKEND #
|
||||||
|
## Parent Container
|
||||||
|
FROM debian
|
||||||
|
|
||||||
|
## Creating Directories
|
||||||
|
RUN mkdir /src /app /tmp/src
|
||||||
|
WORKDIR /tmp/src
|
||||||
|
|
||||||
|
## Copying compile script
|
||||||
|
COPY docker/flipper-dev.sh /bin/flipper-dev.sh
|
||||||
|
RUN chmod +x /bin/flipper-dev.sh
|
||||||
|
|
||||||
|
## Installing Requisites
|
||||||
|
RUN apt update -y
|
||||||
|
RUN apt install -y wget curl build-essential
|
||||||
|
|
||||||
|
## Downloading RUSTUP
|
||||||
|
RUN wget https://sh.rustup.rs -O /tmp/rustup.sh
|
||||||
|
RUN chmod +x /tmp/rustup.sh
|
||||||
|
RUN /tmp/rustup.sh -y
|
||||||
|
|
||||||
|
## Flipper-Zero Build Target
|
||||||
|
RUN /root/.cargo/bin/rustup target add thumbv7em-none-eabihf
|
||||||
|
|
||||||
|
# RUNTIME #
|
||||||
|
CMD "/bin/flipper-dev.sh"
|
8
docker/flipper-dev.sh
Normal file
8
docker/flipper-dev.sh
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Copying source code into working directory
|
||||||
|
cp -r /src/* ./
|
||||||
|
|
||||||
|
# Building the Project
|
||||||
|
cargo build
|
||||||
|
|
||||||
|
# Copy the .FAP file to the app directory
|
||||||
|
cp ./target/thumbv7em-none-eabihf/debug/*.fap /app/
|
6
scripts/build.sh
Executable file
6
scripts/build.sh
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
clear
|
||||||
|
echo "Building Project"
|
||||||
|
docker run --rm -it \
|
||||||
|
-v "$PWD/project:/src:ro,z" \
|
||||||
|
-v "$PWD/build:/app:Z" \
|
||||||
|
flipper-dev
|
5
scripts/docker.sh
Executable file
5
scripts/docker.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
clear
|
||||||
|
echo "Building Docker Image"
|
||||||
|
docker build . \
|
||||||
|
-t flipper-dev \
|
||||||
|
-f docker/Dockerfile
|
Loading…
Reference in a new issue