Skip to content

Commit

Permalink
Set Gradle's user and workdir before its Docker entrypoint?
Browse files Browse the repository at this point in the history
Attempting to avoid the currently occurring error:
    Step JetBrains#1: Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
    Step JetBrains#1: > Could not create service of type CrossBuildFileHashCache using BuildSessionScopeServices.createCrossBuildFileHashCache().

See gradle/gradle#3318.
  • Loading branch information
kaoruAngel committed Aug 16, 2018
1 parent 8b263d3 commit c3a5d54
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions docker/gradle_w_zulu_jdk_6_7_8_9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ RUN apt-get -qq update && \
# Necessary adaptations included
# - pre-installing `wget`
# - pre-installing `unzip`
# - setting a Docker `entrypoint`

CMD ["gradle"]

Expand Down Expand Up @@ -81,12 +82,6 @@ RUN set -o errexit -o nounset \
&& echo "Symlinking root Gradle cache to gradle Gradle cache" \
&& ln -s /home/gradle/.gradle /root/.gradle

#
# An attempt at resolving the Google Cloud Build error
# """
# docker: Error response from daemon: OCI runtime create failed: container_linux.go:296: starting container process caused "exec: \"gradle build\": executable file not found in $PATH": unknown.
# """
ENTRYPOINT ["/usr/bin/gradle"]

# Create Gradle volume
USER gradle
Expand All @@ -96,3 +91,10 @@ WORKDIR /home/gradle
RUN set -o errexit -o nounset \
&& echo "Testing Gradle installation" \
&& gradle --version

#
# An attempt at resolving the Google Cloud Build error
# """
# docker: Error response from daemon: OCI runtime create failed: container_linux.go:296: starting container process caused "exec: \"gradle build\": executable file not found in $PATH": unknown.
# """
ENTRYPOINT ["/usr/bin/gradle"]

0 comments on commit c3a5d54

Please sign in to comment.