GithubHelp home page GithubHelp logo

cliwrap / openjdk8-gradle-git Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 8 KB

Docker image with Alpine linux, openjdk8, gradle, and git set up to mount a directory on the host computer and run commands as the host UID

Shell 94.85% Dockerfile 5.15%
docker docker-image command-line gradle openjdk8

openjdk8-gradle-git's Introduction

Build Status

The Dockerfile in this repository builds an alpine:3.7 container which lets you run commands inside the container using a UID and GID which are passed in environment variables from outside the container, so that any files created in a volume mount can be created as the user and group who initiated docker run. It also has openjdk8-gradle-git, gradle, and git installed.

To download: docker pull cliwrap/openjdk8-gradle-git

Examples

Run latest gradle in current directory:

docker run --rm -e "HOSTUID=`id -u`" -v "`pwd`:/work" -v "$HOME:/home/hostuser" cliwrap/openjdk8-gradle-git gradle build

Use an older version like Gradle 2.14:

docker run --rm -e "HOSTUID=`id -u`" -v "`pwd`:/work" -v "$HOME:/home/hostuser" cliwrap/openjdk8-gradle-git:2.14 gradle build

Create a specific gradle wrapper version in the current directory:

rm -f tmpcidfile
docker run --cidfile=tmpcidfile -e "HOSTUID=`id -u`" \
cliwrap/openjdk8-gradle-git \
sh -c "mkdir wrap; cd wrap; \
  /opt/gradle/bin/gradle wrapper --gradle-version=2.14"
docker cp `cat tmpcidfile`:/home/hostuser/wrap .
mv wrap/* .
rm -rf wrap tmpcidfile

openjdk8-gradle-git's People

Contributors

wtanaka avatar

Watchers

 avatar  avatar

Forkers

wtanaka

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.