Conversation
|
I did version pinning to pass the checks, but I'm not sure if this is a good idea. It will need more maintenance with only little benefits. |
|
Pins can be relaxed imo. We don't depend on the specific version of node, but gulp. PlatformIO I would keep at 3.6.* instead though. What would the flow be to just update internal sources? docker build --target N-step ? |
Main purpose for the internal source is to install dependencies. Secondary to just build the latest |
mcspr
left a comment
There was a problem hiding this comment.
There is a small issue when user has different UID than 1000. We need to both remap docker-run uid and append HOME env for the npm to cache things, or it will crash when trying to write /.npm
i.e. something like this: ... -e "HOME=/tmp" -u
| chown -R worker:worker /espurna && \ | ||
| chown -R worker:worker /firmware | ||
|
|
||
| COPY --chown=worker:worker . /espurna |
There was a problem hiding this comment.
.dockerignore is needed then (in code/ or at the top?)
we need to ignore platformio build directories
code/.pio
code/.piolibdeps
code/.pioenvs
code/node_modules
and some things from gitignore, vscode & ds_store
```diff diff .gitignore .dockerignore 10,13d9 < credentials.h < node_modules < code/utils < custom.h ´´´
|
I took a different way in my automated builds (which are still in dev phase, I need to clean up the
My current |
I make UID and GID configurable. The home directory is inside the image on purpose so that platformio is already ready to build. |
|
@wsw70 thanks for sharing your current status. I though about using |
I am not really knowledgeable about platformio compilation: why is nodejs needed for a complete build? I use the platformio from python and the firmware compile fine. Is there something I am missing in my compilation? |
|
@wsw70 If you change some web files gulp is used to shrinks them to gz.h files. |
|
Which is why I wonder if there is any need to use internal source and keep libraries at all. And we also exchange small git history for docker images :/ There could be another volume exporting toolchain, located at ~/.platformio The part with COPY, pio installs and npm can be removed in favour of customizable entrypoint, either building or installing / updating dependencies. |
Docker build image
This PR contains a docker file for an ESPurna build environment.
Two volumes can be used.
/espurnawith ESPurna source code./firmwaretarget directory for complied firmware files.Build
Examples
This simple example will build all firmware files from dev branch to /tmp/firmware.
This example will only build firmware for environment
intermittech-quinledfrom local files in/home/user/espurna