Giter Site home page Giter Site logo

docker-sbt's Introduction

docker-sbt

Dockerfile for sbt (Scala build tool)

This is built on top of the openjdk image and takes inspiration from hseeberger/scala-sbt.

Usage

Install Docker and pull the image (mozilla/sbt on DockerHub):

docker pull mozilla/sbt

You can then run sbt inside docker to compile code like:

docker run -it --rm mozilla/sbt sbt shell

If you want to execute sbt commands on a project on your local filesystem, you may want to mount the current directory and various local caches as volumes and set the working directory as well:

docker run -it --rm -v ~/.ivy2:/root/.ivy2 -v ~/.sbt:/root/.sbt -v $PWD:/app -w /app mozilla/sbt sbt shell

Building

To build, you need to specify the desired openjdk and sbt versions via --build-arg parameters:

docker build --build-arg OPENJDK_TAG=8u232 --build-arg SBT_VERSION=1.4.1 .

Pushing a new tag to DockerHub

To push and tag a new image with updated versions of openjdk and sbt, you'll need to have a DockerHub account that's a member of the appropriate Mozilla organization and be logged in to DockerHub:

docker login --username=mydockerhubusername

Then use the following recipe to build and push:

OPENJDK_TAG=8u232
SBT_VERSION=1.4.1

docker build \
    --build-arg OPENJDK_TAG=$OPENJDK_TAG \
    --build-arg SBT_VERSION=$SBT_VERSION \
    --tag mozilla/sbt:${OPENJDK_TAG}_${SBT_VERSION} \
    --tag mozilla/sbt:latest \
    .

docker push mozilla/sbt:${OPENJDK_TAG}_${SBT_VERSION}
docker push mozilla/sbt:latest

docker-sbt's People

Contributors

jklukas avatar jtjeferreira avatar mozilla-github-standards avatar sullis avatar valericus avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.