You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2022/05/10 20:20:17 UTC

[GitHub] [tinkerpop] xiazcy commented on a diff in pull request #1639: Gremlin Go Milestone 6

xiazcy commented on code in PR #1639:
URL: https://github.com/apache/tinkerpop/pull/1639#discussion_r869647350


##########
gremlin-go/Dockerfile:
##########
@@ -15,23 +15,34 @@
 # specific language governing permissions and limitations
 # under the License.
 
-ARG GREMLIN_SERVER_VERSION=${version:-3.5.4}
-FROM tinkerpop/gremlin-server:${GREMLIN_SERVER_VERSION}-SNAPSHOT
+ARG GREMLIN_SERVER_VERSION
+FROM tinkerpop/gremlin-server:${GREMLIN_SERVER_VERSION:-3.5.4-SNAPSHOT}
 
 USER root
 RUN mkdir -p /opt
 WORKDIR /opt
 COPY gremlin-server/src/test /opt/test/
+COPY gremlin-go/docker/generate-all.groovy /opt/test/scripts/
 COPY gremlin-go/docker/docker-entrypoint.sh gremlin-go/docker/*.yaml /opt/
 RUN chmod 755 /opt/docker-entrypoint.sh
 
-# Setting to 3.5.3 does gives error even when using outside of Docker.
-ENV NEO4J_VERSION=${version:-3.5.2}
+# Installing dos2unix to avoid errors in running the entrypoint script on Windows machines where their
+# carriage return is \r\n instead of the \n needed for linux/unix containers
+RUN apk update && apk add dos2unix
+RUN dos2unix /opt/docker-entrypoint.sh && apk del dos2unix
+
+ARG NEO4J_VERSION
 # Installs Neo4j libraries to this image so that we can test variants with transactions,
 # but only only port 45940 is configured with the neo4j graph as the neo4j-empty.properties
 # is statically pointing at a temp directory and that space can only be accessed by one
 # graph at a time.
-RUN /opt/gremlin-server/bin/gremlin-server.sh install org.apache.tinkerpop neo4j-gremlin $NEO4J_VERSION
+RUN /opt/gremlin-server/bin/gremlin-server.sh install org.apache.tinkerpop neo4j-gremlin ${NEO4J_VERSION:-3.5.4}

Review Comment:
   The -3.5.4 makes it default to 3.5.4, but can be changed via the "NEO4J_VERSION" build argument in docker-compose. I don't think there is a way to have the compose file dynamically parse the pom file, but I will make a run script to obtain the Gremlin server/Neo4j version and execute the docker-compose for now. Ultimately this will be resolved with the docker design works. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org