Continuing to cleanup
This commit is contained in:
parent
e623b85027
commit
f839241ffb
3 changed files with 11 additions and 9 deletions
11
Dockerfile
11
Dockerfile
|
@ -19,6 +19,7 @@ RUN mkdir -p /app \
|
|||
&& chown -R nobody:nogroup /app
|
||||
WORKDIR /app
|
||||
|
||||
# Source: https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md#ubuntu--debian
|
||||
RUN apt-get update && apt-get install -y make gcc g++ autoconf autotools-dev bsdmainutils build-essential git libboost-all-dev \
|
||||
libcurl4-openssl-dev libdb++-dev libevent-dev libssl-dev libtool pkg-config python python-pip libzmq3-dev wget
|
||||
|
||||
|
@ -68,7 +69,9 @@ RUN cd src \
|
|||
## Build Final Image
|
||||
FROM ubuntu:18.04
|
||||
|
||||
RUN apt-get update && apt-get install -y libevent-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev
|
||||
RUN apt-get update && \
|
||||
apt-get install --no-install-recommends -y libevent-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN mkdir -p /app \
|
||||
&& chown -R nobody:nogroup /app \
|
||||
|
@ -77,10 +80,10 @@ RUN mkdir -p /app \
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy binaries from build containers
|
||||
COPY --from=bitcoind-builder /app/* /app/
|
||||
# Copy binary from bitcoind-builder
|
||||
COPY --from=bitcoind-builder /app/bitcoind /app/bitcoind
|
||||
|
||||
# Copy configuration files and set permissions
|
||||
# Copy binary from rosetta-builder
|
||||
COPY --from=rosetta-builder /app/* /app/
|
||||
|
||||
# Set permissions for everything added to /app
|
||||
|
|
4
Makefile
4
Makefile
|
@ -26,10 +26,8 @@ build-local:
|
|||
docker build -t rosetta-bitcoin:latest .
|
||||
|
||||
build-release:
|
||||
# https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages
|
||||
docker build -t rosetta-bitcoin:$(version) .;
|
||||
docker tag rosetta-bitcoin:$(version) docker.pkg.github.com/coinbase/rosetta-bitcoin/rosetta-bitcoin:$(version);
|
||||
docker push docker.pkg.github.com/coinbase/rosetta-bitcoin/rosetta-bitcoin:$(version);
|
||||
docker save rosetta-bitcoin:$(version) | gzip > rosetta-bitcoin-$(version).tar.gz;
|
||||
|
||||
run-mainnet-online:
|
||||
docker run -d --ulimit "nofile=${NOFILE}:${NOFILE}" -v "${PWD}/bitcoin-data:/data" -e "MODE=ONLINE" -e "NETWORK=MAINNET" -e "PORT=8080" -p 8080:8080 -p 8333:8333 rosetta-bitcoin:latest
|
||||
|
|
|
@ -37,6 +37,7 @@ all Rosetta implementations must be deployable via Docker and support running vi
|
|||
### Install
|
||||
#### Pre-Built
|
||||
You can download a pre-built Docker image from GitHub:
|
||||
TODO: Change to docker import from a release
|
||||
```text
|
||||
docker pull docker.pkg.github.com/coinbase/rosetta-bitcoin/rosetta-bitcoin:v0.0.1
|
||||
```
|
||||
|
@ -52,7 +53,7 @@ and start the `rosetta-bitcoin` server at port `8080`.
|
|||
|
||||
#### Mainnet:Online
|
||||
```text
|
||||
docker run -d --ulimit "nofile=100000:100000" -v "$(shell pwd)/bitcoin-data:/data" -e "MODE=ONLINE" -e "NETWORK=MAINNET" -e "PORT=8080" -p 8080:8080 -p 8333:8333 rosetta-bitcoin:v0.0.1
|
||||
docker run -d --ulimit "nofile=100000:100000" -v "$(pwd)/bitcoin-data:/data" -e "MODE=ONLINE" -e "NETWORK=MAINNET" -e "PORT=8080" -p 8080:8080 -p 8333:8333 rosetta-bitcoin:v0.0.1
|
||||
```
|
||||
|
||||
#### Mainnet:Offline
|
||||
|
@ -62,7 +63,7 @@ docker run -d -e "MODE=OFFLINE" -e "NETWORK=MAINNET" -e "PORT=8081" -p 8081:8081
|
|||
|
||||
#### Testnet:Online
|
||||
```text
|
||||
docker run -d --ulimit "nofile=100000:100000" -v "$(shell pwd)/bitcoin-data:/data" -e "MODE=ONLINE" -e "NETWORK=TESTNET" -e "PORT=8080" -p 8080:8080 -p 18333:18333 rosetta-bitcoin:v0.0.1
|
||||
docker run -d --ulimit "nofile=100000:100000" -v "$(pwd)/bitcoin-data:/data" -e "MODE=ONLINE" -e "NETWORK=TESTNET" -e "PORT=8080" -p 8080:8080 -p 18333:18333 rosetta-bitcoin:v0.0.1
|
||||
```
|
||||
|
||||
#### Testnet:Offline
|
||||
|
|
Loading…
Reference in a new issue