|
| 1 | +import sbtdocker.DockerfileBase |
1 | 2 | import scala.xml.{Node => XmlNode, NodeSeq => XmlNodeSeq, _}
|
2 | 3 | import scala.xml.transform.{RewriteRule, RuleTransformer}
|
3 | 4 | import java.io.File
|
@@ -318,62 +319,8 @@ lazy val cli = project
|
318 | 319 | latest ++ versioned
|
319 | 320 |
|
320 | 321 | },
|
321 |
| - docker / dockerfile := { |
322 |
| - val binaryDistribution = pack.value |
323 |
| - val scipJavaWrapper = (ThisBuild / baseDirectory).value / "bin" / |
324 |
| - "scip-java-docker-script.sh" |
325 |
| - val dockerSetup = (ThisBuild / baseDirectory).value / "bin" / |
326 |
| - "docker-setup.sh" |
327 |
| - new Dockerfile { |
328 |
| - from("eclipse-temurin:17") |
329 |
| - |
330 |
| - // Setup system dependencies. |
331 |
| - run("apt-get", "update") |
332 |
| - run( |
333 |
| - "apt-get", |
334 |
| - "install", |
335 |
| - "--yes", |
336 |
| - "jq", |
337 |
| - "wget", |
338 |
| - "curl", |
339 |
| - "zip", |
340 |
| - "unzip", |
341 |
| - "git", |
342 |
| - // C++ and Python dependencies that may be needed by some random JVM |
343 |
| - // builds. |
344 |
| - "python3", |
345 |
| - "python3-pip", |
346 |
| - "autoconf", |
347 |
| - "automake", |
348 |
| - "libtool", |
349 |
| - "build-essential", |
350 |
| - "libtool", |
351 |
| - "make", |
352 |
| - "g++" |
353 |
| - ) |
354 |
| - |
355 |
| - // Install SDKMAN |
356 |
| - add(dockerSetup, "/docker-setup.sh") |
357 |
| - run("bash", "/docker-setup.sh") |
358 |
| - |
359 |
| - env("PATH", "/opt/maven/bin:${PATH}") |
360 |
| - env("PATH", "/opt/gradle/bin:${PATH}") |
361 |
| - env("PATH", "/root/.local/share/coursier/bin:${PATH}") |
362 |
| - env( |
363 |
| - "JAVA_TOOL_OPTIONS", |
364 |
| - "-XX:MaxRAMPercentage=80.0 -XX:+UseContainerSupport" |
365 |
| - ) |
366 |
| - |
367 |
| - // Mark all directories as safe for Git, so that it doesn't |
368 |
| - // trigger this check and error: |
369 |
| - // `detected dubious ownership in repository at <folder>` |
370 |
| - run("git", "config", "--global", "--add", "safe.directory", "*") |
371 |
| - |
372 |
| - // Install `scip-java` binary. |
373 |
| - add(scipJavaWrapper, "/usr/local/bin/scip-java") |
374 |
| - add(binaryDistribution, "/app/scip-java") |
375 |
| - } |
376 |
| - } |
| 322 | + docker / dockerfile := |
| 323 | + NativeDockerfile((ThisBuild / baseDirectory).value / "Dockerfile") |
377 | 324 | )
|
378 | 325 | .enablePlugins(PackPlugin, DockerPlugin, BuildInfoPlugin)
|
379 | 326 | .dependsOn(scip)
|
|
0 commit comments