Commit c9e667d6 authored by Erik Hedenström's avatar Erik Hedenström

Simplified setup

parent 7f79b01f
Pipeline #738 passed with stages
in 51 seconds
before_script:
- banner "Environment"
- env | sort
- docker info
stages:
- build
- push
- trigger
build_x86:
build:
stage: build
except:
- /^\d+[.]\d+[.]\d+$/
script:
- banner "Build"
- docker build -t ehedenst/elixir:${CI_BUILD_REF:0:7} -f Dockerfile_x86 .
tags:
- docker
- x86_64
push_x86:
stage: push
only:
- master
script:
- banner "Push"
- if [ ! -f ~/.docker/config.json ]; then docker login --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD --email=$DOCKER_HUB_EMAIL; fi
- docker tag -f ehedenst/elixir:${CI_BUILD_REF:0:7} ehedenst/elixir:x86
- docker images | grep ehedenst/elixir
- docker push ehedenst/elixir:x86
tags:
- docker
- x86_64
release_x86:
stage: push
only:
- /^\d+[.]\d+[.]\d+$/
script:
- banner "Push $CI_BUILD_REF_NAME"
- if [ ! -f ~/.docker/config.json ]; then docker login --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD --email=$DOCKER_HUB_EMAIL; fi
- docker tag -f ehedenst/elixir:${CI_BUILD_REF:0:7} ehedenst/elixir:${CI_BUILD_REF_NAME}_x86
- docker images | grep ehedenst/elixir
- docker push ehedenst/elixir:${CI_BUILD_REF_NAME}_x86
tags:
- docker
- x86_64
build_arm:
stage: build
except:
- /^\d+[.]\d+[.]\d+$/
script:
- banner "Build"
- docker build -t ehedenst/elixir:${CI_BUILD_REF:0:7} -f Dockerfile_arm .
tags:
- docker
- armv7l
push_arm:
stage: push
only:
- master
script:
- banner "Push"
- if [ ! -f ~/.docker/config.json ]; then docker login --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD --email=$DOCKER_HUB_EMAIL; fi
- docker tag -f ehedenst/elixir:${CI_BUILD_REF:0:7} ehedenst/elixir:arm
- docker images | grep ehedenst/elixir
- docker push ehedenst/elixir:arm
tags:
- docker
- armv7l
release_arm:
stage: push
only:
- /^\d+[.]\d+[.]\d+$/
script:
- banner "Push $CI_BUILD_REF_NAME"
- if [ ! -f ~/.docker/config.json ]; then docker login --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD --email=$DOCKER_HUB_EMAIL; fi
- docker tag -f ehedenst/elixir:${CI_BUILD_REF:0:7} ehedenst/elixir:${CI_BUILD_REF_NAME}_arm
- docker images | grep ehedenst/elixir
- docker push ehedenst/elixir:${CI_BUILD_REF_NAME}_arm
tags:
- docker
- armv7l
- docker build -t $DOCKER_HUB_REPO .
- docker login --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD
- if [ "$CI_BUILD_REF_NAME" != "master" ]; then docker tag $DOCKER_HUB_REPO $DOCKER_HUB_REPO:$CI_BUILD_REF_NAME; fi
- docker push $DOCKER_HUB_REPO
trigger:
stage: trigger
......
FROM ehedenst/erlang:arm
FROM hedenstroem/erlang
MAINTAINER Erik Hedenström <erik@hedenstroem.com>
ENV ELIXIR_VERSION 1.1.1
ENV ELIXIR_VERSION 1.2.6
ENV ELIXIR_HOME /opt/elixir-${ELIXIR_VERSION}
ENV PATH ${PATH}:${ELIXIR_HOME}/bin
......
FROM ehedenst/erlang:x86
MAINTAINER Erik Hedenström <erik@hedenstroem.com>
ENV ELIXIR_VERSION 1.1.1
ENV ELIXIR_HOME /opt/elixir-${ELIXIR_VERSION}
ENV PATH ${PATH}:${ELIXIR_HOME}/bin
RUN curl -jksSL -o elixir.zip https://github.com/elixir-lang/elixir/releases/download/v${ELIXIR_VERSION}/Precompiled.zip && \
mkdir -p ${ELIXIR_HOME} && \
unzip elixir.zip -d ${ELIXIR_HOME} && \
rm elixir.zip
ENTRYPOINT [ "iex" ]
CMD [ "--version" ]
# ehedenst/elixir
# hedenstroem/elixir
[![build status](https://gitlab.hedenstroem.com/docker/elixir/badges/master/build.svg)](https://gitlab.hedenstroem.com/docker/elixir)
[![Docker Stars](https://img.shields.io/docker/stars/ehedenst/elixir.svg)][hub]
[![Docker Pulls](https://img.shields.io/docker/pulls/ehedenst/elixir.svg)][hub]
[![build status](https://gitlab.hedenstroem.com/docker/elixir/badges/master/build.svg)](https://gitlab.hedenstroem.com/docker/elixir/commits/master)
[![Docker Stars](https://img.shields.io/docker/stars/hedenstroem/elixir.svg)][hub]
[![Docker Pulls](https://img.shields.io/docker/pulls/hedenstroem/elixir.svg)][hub]
A small Docker image based on [Alpine Linux][alpine] that provides [Erlang][erlang] and [Elixir][elixir]. The image is only 30 MB and is built in both an armv7l and x86_64 variant. The arm variant works well with [Raspberry PI][raspberry] and [Scaleway C1][scaleway].
## ehedenst/elixir:arm
[![Image Size](https://img.shields.io/imagelayers/image-size/ehedenst/elixir/arm.svg)](https://imagelayers.io/?images=ehedenst/elixir:arm)
[![Image Layers](https://img.shields.io/imagelayers/layers/ehedenst/elixir/arm.svg)](https://imagelayers.io/?images=ehedenst/elixir:arm)
## ehedenst/elixir:x86
[![Image Size](https://img.shields.io/imagelayers/image-size/ehedenst/elixir/x86.svg)](https://imagelayers.io/?images=ehedenst/elixir:x86)
[![Image Layers](https://img.shields.io/imagelayers/layers/ehedenst/elixir/x86.svg)](https://imagelayers.io/?images=ehedenst/elixir:x86)
## Dockerfile
```dockerfile
FROM ehedenst/erlang:x86
MAINTAINER Erik Hedenström <erik@hedenstroem.com>
ENV ELIXIR_VERSION 1.1.1
ENV ELIXIR_HOME /opt/elixir-${ELIXIR_VERSION}
ENV PATH ${PATH}:${ELIXIR_HOME}/bin
RUN curl -jksSL -o elixir.zip https://github.com/elixir-lang/elixir/releases/download/v${ELIXIR_VERSION}/Precompiled.zip && \
mkdir -p ${ELIXIR_HOME} && \
unzip elixir.zip -d ${ELIXIR_HOME} && \
rm elixir.zip
ENTRYPOINT [ "iex" ]
CMD [ "--version" ]
```
A small Docker image based on [Alpine Linux][alpine] that provides [Erlang][erlang] and [Elixir][elixir].
## License
The code in this repository, unless otherwise noted, is MIT licensed. See the `LICENSE` file in this repository.
[issues]: https://github.com/gliderlabs/docker-alpine/issues
[alpine]: http://alpinelinux.org/
[erlang]: http://www.erlang.org
[elixir]: http://elixir-lang.org
[scaleway]: https://www.scaleway.com
[raspberry]: https://www.raspberrypi.org
[hub]: https://hub.docker.com/r/ehedenst/erlang/
[rebar3]: http://www.rebar3.org
[hub]: https://hub.docker.com/r/hedenstroem/erlang/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment