Skip to content

Commit

Permalink
Adding builds for Elixir 1.11 and 1.12 (#5)
Browse files Browse the repository at this point in the history
* Adding builds for Elixir 1.11 and 1.12

* add new versions to make all target
  • Loading branch information
Nolan Davidson authored Jul 13, 2021
1 parent f386c5e commit f05e583
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
elixir:
- "1.9"
- "1.10"
- "1.11"
- "1.12"
steps:
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
Expand Down
18 changes: 18 additions & 0 deletions 1.11/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM elixir:1.11-slim

ENV SERVICE_ROOT /service
ENV SERVICE_USER service

ADD https://raw.githubusercontent.com/articulate/docker-consul-template-bootstrap/master/install.sh /tmp/consul_template_install.sh
ADD https://raw.githubusercontent.com/articulate/docker-consul-template-bootstrap/master/wait-for-it.sh /wait-for-it.sh

# install hex package manager
RUN mix local.hex --force && \
mix local.rebar --force && \
bash /tmp/consul_template_install.sh && rm /tmp/consul_template_install.sh && \
groupadd $SERVICE_USER && useradd --create-home --home $SERVICE_ROOT --gid $SERVICE_USER --shell /bin/bash $SERVICE_USER && \
chmod a+rx /wait-for-it.sh

WORKDIR $SERVICE_ROOT

ENTRYPOINT ["/entrypoint.sh"]
18 changes: 18 additions & 0 deletions 1.12/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM elixir:1.12-slim

ENV SERVICE_ROOT /service
ENV SERVICE_USER service

ADD https://raw.githubusercontent.com/articulate/docker-consul-template-bootstrap/master/install.sh /tmp/consul_template_install.sh
ADD https://raw.githubusercontent.com/articulate/docker-consul-template-bootstrap/master/wait-for-it.sh /wait-for-it.sh

# install hex package manager
RUN mix local.hex --force && \
mix local.rebar --force && \
bash /tmp/consul_template_install.sh && rm /tmp/consul_template_install.sh && \
groupadd $SERVICE_USER && useradd --create-home --home $SERVICE_ROOT --gid $SERVICE_USER --shell /bin/bash $SERVICE_USER && \
chmod a+rx /wait-for-it.sh

WORKDIR $SERVICE_ROOT

ENTRYPOINT ["/entrypoint.sh"]
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ help:
@grep -hE '(^[a-zA-Z0-9\._-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}{printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m## /[33m/'
.PHONY: help

1.12: ## Build the Elixir 1.12 image
@echo "+ Elixir $@"
@docker build -t articulate/articulate-elixir:1.12 1.12
.PHONY: 1.12

1.11: ## Build the Elixir 1.11 image
@echo "+ Elixir $@"
@docker build -t articulate/articulate-elixir:1.11 1.11
.PHONY: 1.11

1.10: ## Build the Elixir 1.10 image
@echo "+ Elixir $@"
@docker build -t articulate/articulate-elixir:1.10 1.10
Expand All @@ -13,5 +23,5 @@ help:
@docker build -t articulate/articulate-elixir:1.9 1.9
.PHONY: 1.9

all: 1.10 1.9 ## Build all Elixir images
all: 1.12 1.11 1.10 1.9 ## Build all Elixir images
.PHONY: all
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Base Elixir image which contains common dependencies used in our organization.

Elixir version:

* `1.12`
* `1.11`
* `1.10`
* `1.9`

Expand Down

0 comments on commit f05e583

Please sign in to comment.