Commit c2663a1d authored by Krzysztof Jurewicz's avatar Krzysztof Jurewicz

Add Docker files

parent ba2c23ea
Pipeline #17377132 passed with stages
in 4 minutes and 20 seconds
.git/
.eunit
deps
*.o
*.beam
*.plt
erl_crash.dump
ebin/
*.d
doc/*
_rel/*
.erlang.mk/
......@@ -10,3 +10,4 @@ ebin/
*.d
doc/*
_rel/*
.erlang.mk/
stages:
# - test
- build
- release
image: erlang:20
test:
variables:
GIT_DEPTH: "3"
CONTAINER_TEST_IMAGE: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}
CONTAINER_RELEASE_IMAGE: ${CI_REGISTRY_IMAGE}:latest
.test:
stage: test
before_script:
# Workaround for https://github.com/ninenines/erlang.mk/issues/501
- make plt || test $? -eq 2
script:
- make check
- make rel
build:
stage: build
image: docker:latest
script:
- docker build -t ${CONTAINER_TEST_IMAGE} .
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
- docker push ${CONTAINER_TEST_IMAGE}
services:
- docker:dind
tags:
- docker
release:
stage: release
image: docker:latest
script:
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
- docker pull ${CONTAINER_TEST_IMAGE}
- docker tag ${CONTAINER_TEST_IMAGE} ${CONTAINER_RELEASE_IMAGE}
- docker push ${CONTAINER_RELEASE_IMAGE}
services:
- docker:dind
tags:
- docker
only:
- master
FROM erlang:20
WORKDIR /app
COPY . /app
# We create .erlang.mk/ as a workaround until https://github.com/ninenines/erlang.mk/pull/744 is merged.
RUN mkdir -p .erlang.mk && make rel
EXPOSE 46658
CMD ["./_rel/ercoin_release/bin/ercoin_release", "foreground"]
version: "3.1"
services:
abci-server:
image: ercoin:latest
environment:
- ERCOIN_HOME=/ercoin
ports:
- 46658
volumes:
- ${ERCOIN_HOME}:/ercoin
tendermint:
image: tendermint/tendermint:0.15.0
ports:
- "46656:46656"
- "46657:46657"
volumes:
- ${ERCOIN_HOME}:/tendermint
links:
- abci-server
command: node --home /tendermint --proxy_app tcp://abci-server:46658
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