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

Describe how to pass base image #765

Merged
merged 1 commit into from
Mar 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions website/docs/commands/package.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,16 @@ Packaging Scala Native applications to a Docker image is only supported on Linux
scala-cli package --native --docker HelloDocker.scala --docker-image-repository hello-docker
```

### Building Docker container from base image

`--docker-from` lets you specify your base docker image.

The following command generate a `hello-docker` image using base image `openjdk:11`

```bash ignore
scala-cli package --docker HelloDocker.scala --docker-from openjdk:11 --docker-image-repository hello-docker
```

## Scala.JS

Packaging Scala.JS applications results in a `.js` file, that can be run with `node`:
Expand Down