Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slashes are being escaped in entryPoint #126

Open
slyons opened this issue Jan 25, 2022 · 0 comments
Open

Slashes are being escaped in entryPoint #126

slyons opened this issue Jan 25, 2022 · 0 comments

Comments

@slyons
Copy link

slyons commented Jan 25, 2022

Based off of one of the examples, I'm building the Docker file like so:

docker / dockerfile := {
  val artifact:File = assembly.value
  
  val depsArtifact:File = assemblyPackageDependency.value

  val jarTarget = s"//app/${artifact.getName}"
  val depTarget = s"/app/${depsArtifact.getName}"
  val classpathString = depTarget //+ ":" + jarTarget
  new Dockerfile {
    from("adoptopenjdk:" + dockerJavaVersion + "-jre-hotspot")
    add(depsArtifact, depTarget)
    add(artifact, jarTarget)
    entryPoint("java", "-cp", s"$classpathString", "-jar", jarTarget)
  }
}

I'm getting the following Dockerfile:

FROM adoptopenjdk:8-jre-hotspot
ADD 0/spark-eh-adx-assembly-0.0.1-deps.jar /app/spark-eh-adx-assembly-0.0.1-deps.jar
ADD 1/spark-eh-adx-assembly-0.0.1.jar //app/spark-eh-adx-assembly-0.0.1.jar
ENTRYPOINT ["java", "-cp", "\/app\/spark-eh-adx-assembly-0.0.1-deps.jar", "-jar", "\/\/app\/spark-eh-adx-assembly-0.0.1.jar"]

I added an extra slash to jarTarget as some debugging but I'm still getting the escaped slashes in the output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant