Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wilberquito/docker-sbt-it
Interactive sbt docker image
https://github.com/wilberquito/docker-sbt-it
docker sbt scala
Last synced: about 1 month ago
JSON representation
Interactive sbt docker image
- Host: GitHub
- URL: https://github.com/wilberquito/docker-sbt-it
- Owner: wilberquito
- Created: 2024-09-07T18:47:39.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-08T19:32:41.000Z (2 months ago)
- Last Synced: 2024-10-01T15:59:15.796Z (about 2 months ago)
- Topics: docker, sbt, scala
- Language: Dockerfile
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker sbt
This repository contains an image for interacting with Scala using the `sbt`
tool. This image relies on the sbt image provided by the sbt community, which
you can find [here](https://github.com/sbt/docker-sbt/tree/master), and the
Gilter8 templates generator.## Build the Image
```sh
sudo docker build --build-arg HOST_UID=$(id -u) --tag wilberquito/docker-sbt-it . --no-cache
```## Run a Container Using the Built Image
```sh
sudo docker run -it wilberquito/docker-sbt-it
```## Track Progress Inside the Projects Folder
```sh
sudo docker run -v ./projects:/home/nonroot/scala/projects -it wilberquito/docker-sbt-it
```## A Simple Build Tool
If you want to interact with sbt and explore its full set of instructions, just
call it in the terminal.```sh
sbt
```## Scala Interactive Console
```sh
sbt console
```## Create a dummy sbt project using g8 template scala generator
```sh
cd projects/
sbt new scala/scala-seed.g8 --name=hello-world
```## Build the Hello World sbt Project
This process may take some time because the project's dependencies will be
downloaded and the project will be compiled.```sh
cd hello-world/
sbt run
```## If container dies...
If container dies because you closed your laptop
or because you kill it as we computer scientist kill process,
you can start the process again.First find the dead container and take it's ID.
```sh
docker ps -a
```Now start the container
and it's status will change.```sh
docker start
docker ps -a
```Finally attach the container with your shell. If you are running on Linux you
should have bash shell, hence the following will work.```sh
docker exec -it /bin/bash
```