Building docker image from source v11.8.4

#1

Hello, I’m trying to build everything from source, up to the docker image. I couldn’t find instructions for doing so on the docs, so I deduced the commands from reading the source files for the build system. Here’s what I’m doing:

# Install dependencies
yarn

# Build everything
yarn build --linux --prod

# Create distributable package
yarn package --linux --prod

# Build docker image
cd ./out/binaries/
docker build -t my-org/botpress:dev -f ../../build/docker/Dockerfile .

And I get the following error when trying to extract botpress:

Step 5/7 : RUN ./bp extract
 ---> Running in fdda508b5a9a
Error starting botpress
TypeError: Cannot read property 'os' of undefined
    at Object.<anonymous> (/snapshot/botpress/out/bp/sdk/rewire.js:0:0)
    at Module._compile (pkg/prelude/bootstrap.js:1255:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:711:10)
    at Module.load (internal/modules/cjs/loader.js:610:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:549:12)
    at Function.Module._load (internal/modules/cjs/loader.js:541:3)
    at Module.require (internal/modules/cjs/loader.js:648:17)
    at Module.require (pkg/prelude/bootstrap.js:1160:31)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/snapshot/botpress/out/bp/extractor.js:0:0)
    at Module._compile (pkg/prelude/bootstrap.js:1255:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:711:10)
    at Module.load (internal/modules/cjs/loader.js:610:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:549:12)
    at Function.Module._load (internal/modules/cjs/loader.js:541:3)
    at Module.require (internal/modules/cjs/loader.js:648:17)
Cannot read property 'os' of undefined
---STACK---
TypeError: Cannot read property 'os' of undefined
    at Object.<anonymous> (/snapshot/botpress/out/bp/sdk/rewire.js:0:0)
    at Module._compile (pkg/prelude/bootstrap.js:1255:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:711:10)
    at Module.load (internal/modules/cjs/loader.js:610:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:549:12)
    at Function.Module._load (internal/modules/cjs/loader.js:541:3)
    at Module.require (internal/modules/cjs/loader.js:648:17)
    at Module.require (pkg/prelude/bootstrap.js:1160:31)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/snapshot/botpress/out/bp/extractor.js:0:0)
    at Module._compile (pkg/prelude/bootstrap.js:1255:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:711:10)
    at Module.load (internal/modules/cjs/loader.js:610:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:549:12)
    at Function.Module._load (internal/modules/cjs/loader.js:541:3)
    at Module.require (internal/modules/cjs/loader.js:648:17)

If trying to extract outside of the container I get the same error, so I think the failure must be either on the build step or on the package step.

As you might have noticed, I’m trying to build my fork of botpress. I devised this procedure as an easy way to quickly deploy instances preconfigured with my modules on my docker servers. Later I might start a new thread to discuss other ways to do that, but for now I would appreciate if this thread is kept focused on solving the stated problem only, which is building botpress from source.