microscopic-mechanic-13766
08/04/2022, 8:09 AMincalculable-ocean-74010
08/04/2022, 10:26 AMmicroscopic-mechanic-13766
08/04/2022, 10:50 AMmicroscopic-mechanic-13766
08/04/2022, 10:50 AMincalculable-ocean-74010
08/04/2022, 10:56 AMdatahub-web-react/src/app
in the source code.
The dockerfile reads the entire datahub code repository, builds it and then uses the built artifacts as the basis for the image that gets shipped out to customers.
RUN cd datahub-src \
&& ./gradlew :datahub-web-react:build -x test -x yarnTest -x yarnLint \
&& ./gradlew :datahub-frontend:dist -PenableEmber=${ENABLE_EMBER} -PuseSystemNode=${USE_SYSTEM_NODE} -x test -x yarnTest -x yarnLint \
&& cp datahub-frontend/build/distributions/datahub-frontend.zip ../datahub-frontend.zip \
&& cd .. && rm -rf datahub-src && unzip datahub-frontend.zip
FROM base as prod-install
COPY --from=prod-build /datahub-frontend /datahub-frontend/
RUN chown -R datahub:datahub /datahub-frontend && chmod 755 /datahub-frontend
microscopic-mechanic-13766
08/08/2022, 8:14 AMCOPY . datahub-src
copies the code of the repository so that the RUN
command can build it, right?
Is the file hierarchy of the datahub-src
the same that in the datahub-web-react
directory of the source code?incalculable-ocean-74010
08/08/2022, 8:16 AMIs the file hierarchy of the datahub-src the same that in the datahub-web-react directory of the source code?
Yes but the compiled output of the build command will not be. If I’m not mistaken the react code is compiled & minified. I could be wrong though I’m not familiar with the frontend build processmicroscopic-mechanic-13766
08/08/2022, 8:18 AMRUN
command is executed. The minified would make sense as when I tried looking for its files in the container I didn't find much.
Thanks!!microscopic-mechanic-13766
08/08/2022, 11:04 AMStep 13/27 : RUN cd datahub-src && ./gradlew :datahub-web-react:build -x test -x yarnTest -x yarnLint && ./gradlew :datahub-frontend:dist -PenableEmber=${ENABLE_EMBER} -PuseSystemNode=${USE_SYSTEM _NODE} -x test -x yarnTest -x yarnLint && cp datahub-frontend/build/distributions/datahub-frontend.zip ../datahub-frontend.zip && cd .. && rm -rf datahub-src && unzip datahub-frontend.zip
---> Running in dba94d5d2932
/bin/sh: ./gradlew: not found
The command '/bin/sh -c cd datahub-src && ./gradlew :datahub-web-react:build -x test -x yarnTest -x yarnLint && ./gradlew :datahub-frontend:dist -PenableEmber=${ENABLE_EMBER} -PuseSystemNode=${USE _SYSTEM_NODE} -x test -x yarnTest -x yarnLint && cp datahub-frontend/build/distributions/datahub-frontend.zip ../datahub-frontend.zip && cd .. && rm -rf datahub-src && unzip datahub-frontend.zip' returned a non-zero code: 127
Have you, by any chance, experienced this error?
Thanks for the help!incalculable-ocean-74010
08/09/2022, 8:57 AMgradlew
where it does not exist?
Change
RUN cd datahub-src \
&& ./gradlew :datahub-web-react:build -x test -x yarnTest -x yarnLint \
&& ./gradlew :datahub-frontend:dist -PenableEmber=${ENABLE_EMBER} -PuseSystemNode=${USE_SYSTEM_NODE} -x test -x yarnTest -x yarnLint \
&& cp datahub-frontend/build/distributions/datahub-frontend.zip ../datahub-frontend.zip \
&& cd .. && rm -rf datahub-src && unzip datahub-frontend.zip
To
RUN cd datahub-src
RUN ls -lhart .
RUN ./gradlew :datahub-web-react:build -x test -x yarnTest -x yarnLint \
&& ./gradlew :datahub-frontend:dist -PenableEmber=${ENABLE_EMBER} -PuseSystemNode=${USE_SYSTEM_NODE} -x test -x yarnTest -x yarnLint \
&& cp datahub-frontend/build/distributions/datahub-frontend.zip ../datahub-frontend.zip \
&& cd .. && rm -rf datahub-src && unzip datahub-frontend.zip
And see if gradlew
is present in the datahub-src
folder.