os-climate / sostrades-dev-tools

SoSTrades platform local environment deployment
Apache License 2.0
0 stars 4 forks source link

webserver doesn't build in `docker compose build` #3

Closed MichaelTiemannOSC closed 5 months ago

MichaelTiemannOSC commented 6 months ago

Doing a docker compose build after updating all my repos to the latest validation, I get to the end with this error:

 => => exporting layers                                                                                                                                   1.2s
 => => writing image sha256:caba99e6dec4b897a419ca8551e96cbebfcb833a25071efc9ccd0dd221c0b20b                                                              0.0s
 => => naming to docker.io/sostrades/ontologyv4:latest                                                                                                    0.0s
 => [webapi internal] load build definition from Dockerfile                                                                                               0.0s
 => => transferring dockerfile: 3.72kB                                                                                                                    0.0s
 => [webapi auth] library/python:pull token for registry-1.docker.io                                                                                      0.0s
 => [webapi internal] load .dockerignore                                                                                                                  0.0s
 => => transferring context: 434B                                                                                                                         0.0s
 => [webapi internal] load build context                                                                                                                  1.2s
 => => transferring context: 4.99MB                                                                                                                       1.2s
 => [webapi  6/15] RUN mkdir -p /usr/local/sostrades/sources /usr/local/sostrades/conf/ /startup                                                          0.2s
 => [webapi  7/15] WORKDIR /usr/local/sostrades/sources                                                                                                   0.0s
 => [webapi  8/15] COPY ./platform/sostrades-webapi/api.requirements.txt api.requirements.txt                                                             0.1s
 => [webapi  9/15] RUN sed -i '/petsc\|numpy/d' api.requirements.txt &&     pip install --no-cache-dir -r api.requirements.txt pylint gunicorn debugpy  159.4s
 => [webapi 10/15] COPY ./platform/gemseo ./platform/gemseo                                                                                               0.4s
 => [webapi 11/15] COPY ./platform/sostrades-webapi ./platform/sostrades-webapi                                                                           0.1s
 => [webapi 12/15] COPY ./platform/sostrades-core ./platform/sostrades-core                                                                               0.2s
 => [webapi 13/15] COPY ./models ./models                                                                                                                 1.2s
 => [webapi 14/15] RUN if [ -e ./platform/sostrades-webapi/sos_trades_api/version.info ] ; then echo Version.info file provided ; else TZ="UTC" date > .  0.2s
 => [webapi 15/15] RUN ls -d /usr/local/sostrades/sources/platform/* | tr '\n' ':' > /tmp/pythonpath.txt &&     ls -d /usr/local/sostrades/sources/model  0.7s
 => [webapi] exporting to image                                                                                                                           8.1s
 => => exporting layers                                                                                                                                   8.1s
 => => writing image sha256:fa51df007cf4866bd3a961efd552ca95458fd69c96b070ed5bf41e632f921ce0                                                              0.0s
 => => naming to docker.io/sostrades/apiv4:latest                                                                                                         0.0s
 => [webserver internal] load build definition from Dockerfile                                                                                            0.0s
 => => transferring dockerfile: 2.64kB                                                                                                                    0.0s
 => [webserver internal] load metadata for docker.io/library/nginx:latest                                                                                 0.9s
 => [webserver internal] load metadata for docker.io/library/node:18.10.0                                                                                 0.9s
 => [webserver auth] library/nginx:pull token for registry-1.docker.io                                                                                    0.0s
 => [webserver auth] library/node:pull token for registry-1.docker.io                                                                                     0.0s
 => [webserver internal] load .dockerignore                                                                                                               0.0s
 => => transferring context: 434B                                                                                                                         0.0s
 => CANCELED [webserver front_build  1/11] FROM docker.io/library/node:18.10.0@sha256:9d8a6466c6385e05f62f8ccf173e80209efb0ff4438f321f09ddf552b05af3ba    0.8s
 => => resolve docker.io/library/node:18.10.0@sha256:9d8a6466c6385e05f62f8ccf173e80209efb0ff4438f321f09ddf552b05af3ba                                     0.0s
 => => sha256:35ff1df466e834b2408d56faca095d16dc4002cbd3e4c46c15c72e2aaf18afaf 7.74kB / 7.74kB                                                            0.0s
 => => sha256:f606d8928ed378229f2460b94b504cca239fb906efc57acbdf9340bd298d5ddf 0B / 55.05MB                                                               0.8s
 => => sha256:9d8a6466c6385e05f62f8ccf173e80209efb0ff4438f321f09ddf552b05af3ba 1.21kB / 1.21kB                                                            0.0s
 => => sha256:ffe56c7717efb6724b2d96a87ee973a568586dbff4cc76188977c05bce35424e 2.21kB / 2.21kB                                                            0.0s
 => => sha256:47db815c6a4547dc224b75222193cb1851cf529d2cbdf26f854b9bbf97099b98 1.05MB / 5.16MB                                                            0.8s
 => => sha256:bf48494000001a037b72870d2a6a2536f9da8bc5d1ceddd72d79f4a51fe7a60e 2.10MB / 10.88MB                                                           0.8s
 => [webserver internal] load build context                                                                                                               0.7s
 => => transferring context: 17.05MB                                                                                                                      0.7s
 => CANCELED [webserver stage-1 1/4] FROM docker.io/library/nginx:latest@sha256:9ff236ed47fe39cf1f0acf349d0e5137f8b8a6fd0b46e5117a401010e56222e1          0.8s
 => => resolve docker.io/library/nginx:latest@sha256:9ff236ed47fe39cf1f0acf349d0e5137f8b8a6fd0b46e5117a401010e56222e1                                     0.0s
 => => sha256:9ff236ed47fe39cf1f0acf349d0e5137f8b8a6fd0b46e5117a401010e56222e1 9.85kB / 9.85kB                                                            0.0s
 => => sha256:c613f16b664244b150d1c3644cbc387ec1fe8376377f9419992280eb4a82ff3b 7.00kB / 7.00kB                                                            0.0s
 => => sha256:cd64407576751d9b9ba4924f758d3d39fe76a6e142c32169625b60934c95f057 2.29kB / 2.29kB                                                            0.0s
 => CACHED [webserver front_build  2/11] RUN export NG_CLI_ANALYTICS=off                                                                                  0.0s
 => CACHED [webserver front_build  3/11] WORKDIR /tmp/node_build/sostrades-webgui/                                                                        0.0s
 => CACHED [webserver front_build  4/11] ADD ./platform/sostrades-webgui/package.json ./                                                                  0.0s
 => CACHED [webserver front_build  5/11] RUN npm install                                                                                                  0.0s
 => CACHED [webserver front_build  6/11] COPY  ./platform/sostrades-webgui/src ./src                                                                      0.0s
 => ERROR [webserver front_build  7/11] COPY [./platform/sostrades-webgui/*.json, ./platform/sostrades-webgui/browserslistrc, ./platform/sostrades-webgu  0.0s
------
 > [webserver front_build  7/11] COPY [./platform/sostrades-webgui/*.json, ./platform/sostrades-webgui/browserslistrc, ./platform/sostrades-webgui/karma.conf.js, ./]:
------
failed to solve: failed to compute cache key: failed to calculate checksum of ref 22f1da88-28e1-4032-b842-7b4a5add948d::411i8kht8qjr8jgg6xq7se9sh: "/platform/sostrades-webgui/browserslistrc": not found
MichaelTiemannOSC commented 6 months ago

The above might be due to the fact that I updated various repos in place within the hierarchy of sostrades-dev-tools, rather than blowing everything away and re-downloading it, and letting whatever magic happen when running PrepareDevEnv.sh.

When I copied . browserslistrc to browserslistrc in the platform/sostrades-webgui/ directory, the build completed.

ggoyon commented 5 months ago

Thank you for the feedback, this has been fixed in https://github.com/os-climate/sostrades-dev-tools/commit/c1afde9ce85f8166a26714b300b0451df864ef40