Hi Team, We trying to build arm64 Images for front...
# all-things-deployment
b
Hi Team, We trying to build arm64 Images for frontend in my local MAC M1 chip. Build was succcessful using the command
./gradlew build
. When I tried to build frontend image using the below dockerfile the Image build is getting stuck in the middle at gradle build command and it’s not moving forward. I had check the logs using
--debug
mode but didn’t figure out the actual issue. I had also attached the logs for your reference. Could you please help me out with the issue.
docker buildx build . -t datahub --platform=linux/arm64
d
@orange-night-91387 Hi - could you look into this?
a
Not sure what's going wrong here as the command you are running in your dockerfile has multiple steps that could be failing and is different from what we run to deploy our images. The logs unfortunately don't specify which part of the command fails, just that it looks like it's hitting an EOFException somewhere during the yarn commands. We just execute:
Copy code
./gradlew :datahub-frontend:dist -x test -x yarnTest -x yarnLint --parallel
then move the output zip and load it in using:
Copy code
mv ./datahub-frontend/build/distributions/datahub-frontend-*.zip datahub-frontend.zip
in CI and then:
Copy code
COPY ./datahub-frontend.zip /
RUN unzip datahub-frontend.zip && rm datahub-frontend.zip
in the dockerfile. You're loading in a ton of extra stuff into the image and also building the web-react module in your command:
Copy code
RUN cd datahub-src \
    && ./gradlew :datahub-web-react:build -PuseSystemNode=${USE_SYSTEM_NODE} -x test -x yarnTest -x yarnLint --no-daemon —debug \
    && ./gradlew :datahub-frontend:dist -PreleaseVersion=v0.10.0.6 -PuseSystemNode=${USE_SYSTEM_NODE} -x test -x yarnTest -x yarnLint --no-daemon —debug \
    && cp datahub-frontend/build/distributions/datahub-frontend.zip ../datahub-frontend.zip \
    && cd .. && rm -rf datahub-src && unzip datahub-frontend.zip