Continuing to cleanup

This commit is contained in:
Patrick O'Grady 2020-09-19 11:48:34 -07:00
parent e623b85027
commit f839241ffb
No known key found for this signature in database
GPG key ID: 8DE11C985C0C8D85
3 changed files with 11 additions and 9 deletions

View file

@ -19,6 +19,7 @@ RUN mkdir -p /app \
&& chown -R nobody:nogroup /app && chown -R nobody:nogroup /app
WORKDIR /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 \ 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 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 ## Build Final Image
FROM ubuntu:18.04 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 \ RUN mkdir -p /app \
&& chown -R nobody:nogroup /app \ && chown -R nobody:nogroup /app \
@ -77,10 +80,10 @@ RUN mkdir -p /app \
WORKDIR /app WORKDIR /app
# Copy binaries from build containers # Copy binary from bitcoind-builder
COPY --from=bitcoind-builder /app/* /app/ 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/ COPY --from=rosetta-builder /app/* /app/
# Set permissions for everything added to /app # Set permissions for everything added to /app

View file

@ -26,10 +26,8 @@ build-local:
docker build -t rosetta-bitcoin:latest . docker build -t rosetta-bitcoin:latest .
build-release: 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 build -t rosetta-bitcoin:$(version) .;
docker tag rosetta-bitcoin:$(version) docker.pkg.github.com/coinbase/rosetta-bitcoin/rosetta-bitcoin:$(version); docker save rosetta-bitcoin:$(version) | gzip > rosetta-bitcoin-$(version).tar.gz;
docker push docker.pkg.github.com/coinbase/rosetta-bitcoin/rosetta-bitcoin:$(version);
run-mainnet-online: 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 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

View file

@ -37,6 +37,7 @@ all Rosetta implementations must be deployable via Docker and support running vi
### Install ### Install
#### Pre-Built #### Pre-Built
You can download a pre-built Docker image from GitHub: You can download a pre-built Docker image from GitHub:
TODO: Change to docker import from a release
```text ```text
docker pull docker.pkg.github.com/coinbase/rosetta-bitcoin/rosetta-bitcoin:v0.0.1 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 #### Mainnet:Online
```text ```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 #### Mainnet:Offline
@ -62,7 +63,7 @@ docker run -d -e "MODE=OFFLINE" -e "NETWORK=MAINNET" -e "PORT=8081" -p 8081:8081
#### Testnet:Online #### Testnet:Online
```text ```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 #### Testnet:Offline