Merge pull request #355 from markusb/main
Improve the compile-with-docker.sh script
This commit is contained in:
@@ -238,7 +238,7 @@ This is the least demanding option as you don't have to install enything on your
|
||||
|
||||
### Docker build method
|
||||
|
||||
If you have docker installed you can use [compile-with-docker.bat](./compile-with-docker.bat) (Windows) or [compile-with-docker.sh](./compile-with-docker.sh) (Linux/Mac), the output files are created in `compiled-firmware` folder. This method gives significantly smaller binaries, I've seen differences up to 1kb, so it can fit more functionalities this way. The challenge can be (or not) installing docker itself.
|
||||
If you have docker installed you can use [compile-with-docker.bat](./compile-with-docker.bat) (Windows) or [compile-with-docker.sh](./compile-with-docker.sh) (Linux/Mac), the output files are created in `compiled-firmware` folder. This method gives significantly smaller binaries, I've seen differences up to 1kb, so it can fit more functionalities this way. The challenge can be (or not) installing docker itself. You may need to uncomment and customize the DOCKER_NETWORK environment variable in the script.
|
||||
|
||||
### Windows environment build method
|
||||
|
||||
|
@@ -1,8 +1,14 @@
|
||||
#!/bin/sh
|
||||
#export DOCKER_DEFAULT_PLATFORM=linux/amd64
|
||||
#export DOCKER_NETWORK="--network=host"
|
||||
IMAGE_NAME="uvk5"
|
||||
rm "${PWD}/compiled-firmware/*"
|
||||
docker build -t $IMAGE_NAME .
|
||||
echo "Building docker image $IMAGE_NAME"
|
||||
if ! docker build -t $DOCKER_NETWORK $IMAGE_NAME .
|
||||
then
|
||||
echo "Failed to build docker image"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
custom() {
|
||||
echo "Custom compilation..."
|
||||
|
Reference in New Issue
Block a user