Skip to content

Commit

Permalink
Merge pull request #2717 from VirtusLab/stable
Browse files Browse the repository at this point in the history
Back port of documentation changes to main
  • Loading branch information
Gedochao authored Feb 7, 2024
2 parents 05f1466 + 9e30ea7 commit 0a75d4c
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion website/docs/commands/package.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,25 @@ Hello
Hello
-->

By default assemblies are self-executable, just like the default package format. With the `--preamble=false` option, you can build an assembly that just contains the JAR and does not contain any built-in Bash code, and therefore can be launched directly with Java and is more portable:

<ChainedSnippets>

```bash
scala-cli --power package Hello.scala -o hello.jar --assembly --preamble=false
java -jar hello.jar
```

```text
Hello
```

</ChainedSnippets>

<!-- Expected:
Hello
-->

## Docker container

Scala CLI can create an executable application and package it into a docker image.
Expand Down Expand Up @@ -506,4 +525,3 @@ The using directive allows you to define the image repository.
```scala compile power
//> using packaging.dockerImageRepository scala-cli
```

0 comments on commit 0a75d4c

Please sign in to comment.