I am trying to install google chrome by running a shell script in a “Dockerfile” to run selenium.
I am referring to the following.
However, there seems to be an error in the shell script, and the leading “#! /usr/bin/env bash” and there seems to be an error in “#! /usr/bin/env bash” only, but the error still occurs.
The Logs page on Render.com says "error: failed to solve: process “/bin/sh -c chmod +x render-build.sh && render-build.sh” did not complete successfully: exit I cannot get any details of the error, only “code: 127”.
Incidentally, “#! /bin/sh” only, no error occurred.
If I use “#! /usr/bin/env bash”, do I need to set any environment variables in Render.com to use it?
Currently, we are using free plan for the trial stage.
The source is as follows.
■ render-build.sh
#!/usr/bin/env bash
■ Dockerfile
FROM maven:3.9.6-eclipse-temurin-21 AS build
COPY . .
RUN mvn clean package -Dmaven.test.skip=true
FROM eclipse-temurin:21-alpine
# Javaアプリケーションのjarをコピー
COPY --from=build /target/xbot-nonmoral.jar xbot-nonmoral.jar
# ローカルのrender-build.shをコピー
COPY render-build.sh .
# render-build.shに実行権限を付与
# render-build.shを実行
RUN chmod +x render-build.sh \
&& render-build.sh
# seleniumの設定
ENV PATH="${PATH}:/opt/render/project/.render/chrome/opt/google/chrome/"
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "xbot-nonmoral.jar"]