Coder Social home page Coder Social logo

serandel / kscript-docker Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 9 KB

Docker image to run kscript (Kotlin scripting)

Home Page: https://cloud.docker.com/repository/docker/serandel/kscript

License: Apache License 2.0

Dockerfile 88.74% Shell 11.26%
docker docker-image kscript kotlin

kscript-docker's Introduction

kscript-docker

Docker Cloud Build Status

Docker image to run kscript (Kotlin scripting) without needing to install it.

The image is labelled with the same version number as kscript, with the underlying dependencies as updated as possible.

The base image is Ubuntu, with Java, Maven, Kotlin and kscript installed with SDKMAN!.

Usage with inline code

docker run -i serandel/kscript 'println("Hello, world!")'

Usage with a script from outside the container

docker run -i serandel/kscript - < script.kts

This will make kscript read the code from stdin while piping the file. Be aware that the -i flag is needed to have stdout redirected outside the container. --rm is just to stop polluting Docker with stopped containers.

Volume

It's highly advisable to create a volume for /root/.kscript so the JARs are cached between different invocations to containers.

docker run -i --rm -v kscript:/root/.kscript serandel/kscript 'println("Hello, world!")'

There is a kscript.sh Bash shell script that invokes the container with these arguments for your convenience.

kscript-docker's People

Contributors

serandel avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

kscript-docker's Issues

Update please?

I was having problems with the @file:DependsOn style annotations complaining with

[kscript] Resolving dependencies...
[kscript]     Resolving de.mpicbg.scicomp:kutils:0.4...[kscript] [ERROR] Failed to lookup dependencies. Check dependency locators or file a bug on https://github.com/holgerbrandl/kscript
[kscript] [ERROR] Exception: org.sonatype.aether.resolution.DependencyResolutionException: failed to load 'de.mpicbg.scicomp:kutils:jar:0.4 (compile)' from ["jcenter (http://jcenter.bintray.com/, releases+snapshots) without authentication"] into /root/.m2/repository

I updated:

  1. Ubuntu to eoan (because Cosmic has moved to old-releases)
  2. Java to 8.0.232.fx-zulu (because 8.0.202-zulu has vanished)
  3. Kotlin to 1.4.0 (just... uh, because), and
  4. kscript to 2.9.3 (because I assumed the latest would have a fix for the main issue)

... and the problem is fixed for me.

Maybe you could update? Your container is the first hit I get in Google.

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.