Skip to content

Commit

Permalink
Merge pull request ethereum#47 from etienne-napoleone/docker
Browse files Browse the repository at this point in the history
Docker for tomochain base image
  • Loading branch information
ngtuna authored Jun 21, 2018
2 parents 6a3b1a8 + 0d1807d commit 53e7336
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 23 deletions.
19 changes: 11 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Build Geth in a stock Go builder container
FROM golang:1.10-alpine as builder

RUN apk add --no-cache make gcc musl-dev linux-headers

ADD . /go-ethereum
RUN cd /go-ethereum && make geth
ADD . /tomochain
RUN cd /tomochain && make tomo

# Pull Geth into a second stage deploy alpine container
FROM alpine:latest

RUN apk add --no-cache ca-certificates
COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/
LABEL maintainer="[email protected]"

EXPOSE 8545 8546 30303 30303/udp 30304/udp
ENTRYPOINT ["geth"]
COPY --from=builder /tomochain/build/bin/tomo /usr/local/bin/tomo

RUN chmod +x /usr/local/bin/tomo

EXPOSE 8545
EXPOSE 30303

ENTRYPOINT ["/usr/local/bin/tomo", "--help"]
15 changes: 0 additions & 15 deletions Dockerfile.alltools

This file was deleted.

11 changes: 11 additions & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "3.4"

services:

sut:
build: .
volumes:
- "./docker/docker_tests.sh:/test/docker_tests.sh"
entrypoint:
- /bin/sh
- /test/docker_tests.sh
3 changes: 3 additions & 0 deletions docker/docker_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

$(tomo --help | grep -q tomo)

0 comments on commit 53e7336

Please sign in to comment.