mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
Merge pull request #47 from etienne-napoleone/docker
Docker for tomochain base image
This commit is contained in:
commit
53e7336ae9
4 changed files with 25 additions and 23 deletions
19
Dockerfile
19
Dockerfile
|
|
@ -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="etienne@tomochain.com"
|
||||
|
||||
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"]
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
# 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 all
|
||||
|
||||
# Pull all binaries into a second stage deploy alpine container
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk add --no-cache ca-certificates
|
||||
COPY --from=builder /go-ethereum/build/bin/* /usr/local/bin/
|
||||
|
||||
EXPOSE 8545 8546 30303 30303/udp 30304/udp
|
||||
11
docker-compose.test.yml
Normal file
11
docker-compose.test.yml
Normal file
|
|
@ -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
docker/docker_tests.sh
Normal file
3
docker/docker_tests.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
$(tomo --help | grep -q tomo)
|
||||
Loading…
Reference in a new issue