-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from clojerl/dockerfile
Dockerfile
- Loading branch information
Showing
4 changed files
with
47 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
FROM jfacorro/clojerl:armhf-alpine | ||
FROM arm32v6/alpine:3.6 | ||
|
||
# Install build deps | ||
RUN apk add --no-cache --virtual .try-clojerl-build-deps git make \ | ||
# Checkout | ||
&& git clone --depth 1 https://github.com/clojerl/try_clojerl try_clojerl \ | ||
&& cd try_clojerl \ | ||
&& rebar3 clojerl compile \ | ||
&& rebar3 release \ | ||
# Clean deps | ||
&& apk del .try-clojerl-build-deps | ||
RUN apk add --update ncurses openssl | ||
|
||
ENTRYPOINT /try_clojerl/_build/default/rel/try_clojerl/bin/try_clojerl foreground | ||
COPY _build/prod/rel/try_clojerl /opt/try_clojerl | ||
|
||
ENTRYPOINT /opt/try_clojerl/bin/try_clojerl foreground |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.PHONY: all | ||
|
||
BUILD_IMAGE = jfacorro/erlang:20.1.1-armhf-alpine | ||
DOCKER_REPO = jfacorro/try_clojerl | ||
DOCKER_TAG = $(shell git describe --always 2>/dev/null || echo 0) | ||
|
||
all: | ||
rebar3 clojerl compile | ||
|
||
release: all | ||
rebar3 as prod release | ||
|
||
docker-build: | ||
@ docker run -i \ | ||
-v ${PWD}:/project \ | ||
-w /project \ | ||
${BUILD_IMAGE} scripts/build | ||
|
||
docker: docker-build | ||
@ docker build -t ${DOCKER_REPO}:${DOCKER_TAG} . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
# Install deps | ||
apk add --update git make wget | ||
|
||
# Install rebar3 | ||
wget https://s3.amazonaws.com/rebar3/rebar3 && chmod +x rebar3 | ||
mv rebar3 /usr/local/bin/rebar3 | ||
|
||
# Build release | ||
make release |