VCVRack / rack-plugin-toolchain

53 stars 12 forks source link

Build image with Dockerfile doesn't include Rack SDK download #25

Closed qno closed 1 year ago

qno commented 1 year ago

When building toolchain image with provided Dockerfile the Rack SDK is not included. It looks like it is missing the make rack-sdk-all as defined in https://github.com/VCVRack/rack-plugin-toolchain/blob/v2/Makefile#L118.

The Dockerfile should look like this:

...
RUN JOBS=$JOBS make toolchain-mac
RUN JOBS=$JOBS make toolchain-win
RUN JOBS=$JOBS make toolchain-lin

RUN make rack-sdk-all
...

Or is it supposed to not include the SDKs by default anymore when using Dockerfile?

When using the toolchain container this error occures

/home/build/rack-plugin-toolchain /__w/vcv-plugin-github-actions-example/vcv-plugin-github-actions-example
cd /__w/vcv-plugin-github-actions-example/vcv-plugin-github-actions-example && make clean
make[1]: Entering directory '/__w/vcv-plugin-github-actions-example/vcv-plugin-github-actions-example'
make[1]: Leaving directory '/__w/vcv-plugin-github-actions-example/vcv-plugin-github-actions-example'
Makefile:22: /home/build/rack-plugin-toolchain/Rack-SDK-lin/plugin.mk: No such file or directory
make[1]: *** No rule to make target '/home/build/rack-plugin-toolchain/Rack-SDK-lin/plugin.mk'.  Stop.
make: *** [Makefile:160: plugin-build-linux] Error 2

See also https://github.com/qno/vcv-plugin-github-actions-example/actions/runs/3441248912/jobs/5740589372

cschol commented 1 year ago

No. The Rack SDK is not included in the Docker image anymore. This allows updating the Rack SDK without rebuilding the Docker image.

Are you running make docker-build?

Because that target executes the rack-sdk-all target as well (see https://github.com/VCVRack/rack-plugin-toolchain/blob/v2/Makefile#L228).

qno commented 1 year ago

No, I build the image with Github workflow actions (https://github.com/qno/rack-plugin-toolchain/blob/v2/.github/workflows/docker-publish.yml#L63) and use the docker/build-push-action which uses directly the contained Dockerfile. I will try to workaround this issue.

cschol commented 1 year ago

Sorry, the Dockerfile is not intended to be built without our corresponding Makefile.

qno commented 1 year ago

A solution could be to add the SDK download to an Docker ENTRYPOINT script, so it downloads the SDK when you actually start the container.