asdf-community / asdf-ubuntu

Ubuntu docker images for asdf tools

Home Page:https://github.com/asdf-vm/asdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

asdf-ubuntu

This repo provides Dockerized versions of asdf supported tool sets.

An image can provide one or more asdf tools, you can for example create a image with just erlang, or erlang+elixir or erlang+elixir+node, basically anything that asdf supports.

There's also an asdf-alpine sister repo.

Images

The list of built images can be found at dockerhub and you can find their source branch on github.

Status Dockerfile
Travis branch FROM vborja/asdf-ubuntu:elixir-1.5.0-otp-20-node-8.2.1
Travis branch FROM vborja/asdf-ubuntu:elixir-1.5.0-otp-20
Travis branch FROM vborja/asdf-ubuntu:elixir-1.5.0-rc.2-otp-20
Travis branch FROM vborja/asdf-ubuntu:erlang-20.0
Travis branch FROM vborja/asdf-ubuntu:master
Travis branch FROM vborja/asdf-ubuntu:nodejs-8.2.1
Travis branch FROM vborja/asdf-ubuntu:ruby-2.4.1

Build

Images are built automatically for every branch and published at dockerhub.

The master branch provides the base Dockerfile for all other branches. See the Repo Layout section for more information on how to create more images.

Every branch name must be a valid docker tag name that specifies the tool names and versions it provides, for example:

erlang-20.0 and elixir-1.5.0-rc.2-otp-20

This way people can either base their own Docker images on them or try any existing tool set published as an image, like latest elixir:

docker run --rm -ti vborja/asdf-ubuntu:elixir-1.5.0-rc.2-otp-20 iex

Contributing new tool sets or versions.

All contributions are more than welcome, if you'd like to help expanding the number of tools available as docker images that would be really great!

If you want to create a new version, just start a new branch from the old-version, and send a PR, be sure to build the image locally and test if the tool works as expected.

If you are adding a new unrelated tool, please create an orphan branch, for example

git clone https://github.com/vic/asdf-ubuntu
cd asdf-ubuntu

# start working on a new node image
git checkout --orphan nodejs-8.2.1
rm * # clean the branch files


echo 'FROM vborja/asdf-ubuntu' > Dockerfile
# Read the following section about Repo layout

# build it
docker build . -t nodejs-8.2.1

# try it
docker run --rm -ti nodejs-8.2.1 node

# commit and create a new PR when everything is ok.

If you create a new branch be sure to add the .travis.yml file so that the image for that branch is built automatically.

Repo layout

The master Dockerfile from this repo serves as base for all asdf-ubuntu images. It's single purpose is to create an asdf user with home /asdf, add the asdf shim directory to PATH, along with a asdf-install-toolset.

Your repo can contain as many asdf tools as you want, the following example is taken from erlang-20.0 branch.

/
  Dockerfile    # 
  
  erlang/       # the directory name must be the same as the tool name.
    version     # stores the erlang version as expected by asdf
    plugin-repo # stores the erlang tool plugin url.
    build-deps  # an script run as root to install system dependencies
    build-env   # an script run as asdf user sourced before asdf install.  
    
  other/        # another tool with the same file structure

The Dockerfile content typically looks like:

FROM vborja/asdf-ubuntu

# start erlang install
COPY erlang .asdf/toolset/erlang/
USER root
RUN bash .asdf/toolset/erlang/build-deps
USER asdf
RUN asdf-install-toolset erlang

# install other tool if needed
COPY other .asdf/toolset/other/
USER root
RUN bash .asdf/toolset/other/build-deps
USER asdf
RUN asdf-install-toolset other

Some images like elixir-1.5.0-rc.2-otp-20 start from a previous one, in this case from (erlang 20.0) and just add another tool into it.

About

Ubuntu docker images for asdf tools

https://github.com/asdf-vm/asdf

License:Apache License 2.0


Languages

Language:Shell 62.9%Language:Dockerfile 37.1%