I’m facing an issue that is probably something some of you already stumbled on before.
I always try to run all my containers on
scratch images and with a user different than
root. My last stage when building the images is something like this:
# create the final image FROM resin/scratch as final COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=builder /app /app USER nobody:nobody ENTRYPOINT ["/app"]
This works fine unless the application needs to create/write files on the persistence folder (using named volumes for files on
I have tried a few things but without success, like changing the ownership of the named volume folder. That works when running the container on my local machine, but not when running on balenaOS.
Does anyone have any tips about this?