Hey all, I’m trying to use
balena build to build a project. My use case is that I need to make local edits to the container before it’s pushed/deployed to balena cloud. I had some issues creating a working container based off of the balenalib/ base images using plain docker, so figured I would try yo use balena build instead.
docker-compose.yml file is as follows:
version: "2" services: ignition: build: ./myproject ports: - "9099:9099"
Dockerfile (of course under
./myproject/) is as follows:
FROM balenalib/amd64-ubuntu:jammy-run RUN apt-get update && \ apt-get install -y unzip COPY ~/myprojectsrc/linux/amd64/myproject.zip ./myproject.zip RUN unzip myproject.zip -d myproject RUN chmod +x ./myproject/*.sh CMD ["/bin/bash", "/myproject/myproject.sh"]
balena build doesn’t complain initially and downloads and installs the unzip util. However, after that the build errors out with the following message:
[Error] Build failed. COPY failed: file not found in build context or excluded by .dockerignore: stat ~/myprojectsrc/linux/amd64/myproject.zip: file does not exist
Not sure what exactly is going on - the COPY works perfectly running under normal Docker. And when I move the
myproject.zip file to the Dockerfile’s local directory (
./myproject), I instead get:
[Error] Build failed. Array buffer allocation failed