Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: launchpad build docker images #4042

Merged
merged 1 commit into from
Apr 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions applications/launchpad/docker_rig/base_node.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
FROM quay.io/tarilabs/rust_tari-build-with-deps:nightly-2021-11-01 as builder
FROM rust:1.60-buster as builder

ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt -y install \
apt-transport-https \
bash \
ca-certificates \
curl \
gpg \
iputils-ping \
less \
libreadline-dev \
libsqlite3-0 \
openssl \
telnet \
cargo \
clang \
cmake

RUN apt update && apt upgrade -y && apt clean


WORKDIR /tari

# Adding only necessary things up front and copying the entrypoint script last
Expand Down Expand Up @@ -65,7 +86,7 @@ ENV dockerfile_version=$VERSION
ENV APP_NAME=base_node APP_EXEC=tari_base_node

COPY --from=builder /tari/target/release/$APP_EXEC /usr/bin/
COPY applications/launchpad/docker_rig/start_tari_app.sh /usr/bin/start_tari_app.sh
COPY /applications/launchpad/docker_rig/start_tari_app.sh /usr/bin/start_tari_app.sh


ENTRYPOINT [ "start_tari_app.sh", "-c", "/var/tari/config/config.toml", "-b", "/var/tari/base_node" ]
# CMD [ "--non-interactive-mode" ]
24 changes: 22 additions & 2 deletions applications/launchpad/docker_rig/console_wallet.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
FROM quay.io/tarilabs/rust_tari-build-with-deps:nightly-2021-11-01 as builder
FROM rust:1.60-buster as builder

ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt -y install \
apt-transport-https \
bash \
ca-certificates \
curl \
gpg \
iputils-ping \
less \
libreadline-dev \
libsqlite3-0 \
openssl \
telnet \
cargo \
clang \
cmake

RUN apt update && apt upgrade -y && apt clean


WORKDIR /tari

# Adding only necessary things up front and copying the entrypoint script last
Expand Down Expand Up @@ -61,4 +82,3 @@ COPY --from=builder /tari/target/release/$APP_EXEC /usr/bin/
COPY applications/launchpad/docker_rig/start_tari_app.sh /usr/bin/start_tari_app.sh

ENTRYPOINT [ "start_tari_app.sh", "-c", "/var/tari/config/config.toml", "-b", "/var/tari/wallet" ]
# CMD [ "--non-interactive-mode" ]
43 changes: 11 additions & 32 deletions applications/launchpad/docker_rig/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ services:
build:
context: .
dockerfile: tor.Dockerfile
# volumes:
# - ${DATA_FOLDER}/tor:/etc/tor/
# ports:
# - 9050:9050
# - 9051:9051
volumes:
- ${DATA_FOLDER}/tor:/etc/tor/

base_node:
image: quay.io/tarilabs/tari_base_node:latest
Expand All @@ -25,16 +22,7 @@ services:
APP_EXEC: tari_base_node
WAIT_FOR_TOR: ${WAIT_FOR_TOR:-0}
TARI_NETWORK: ${TARI_NETWORK}
TARI_BASE_NODE__DIBBLER__TOR_CONTROL_AUTH: "password=${TOR_CONTROL_AUTH:-tari}"
TARI_BASE_NODE__DIBBLER__DATA_DIR: "/blockchain/dibbler"
TARI_BASE_NODE__IGOR__DATA_DIR: "/blockchain/igor"
TARI_BASE_NODE__MAINNET__DATA_DIR: "/blockchain/mainnet"
TARI_BASE_NODE__DIBBLER__TOR_CONTROL_ADDRESS: "/dns4/tor/tcp/9051"
TARI_BASE_NODE__DIBBLER__TOR_SOCKS_ADDRESS_OVERRIDE: "/dns4/tor/tcp/9050"
TARI_BASE_NODE__DIBBLER__TOR_FORWARD_ADDRESS: "/dns4/base_node/tcp/18189"
TARI_BASE_NODE__DIBBLER__TCP_LISTENER_ADDRESS: "/dns4/base_node/tcp/18189"
TARI_BASE_NODE__DIBBLER__GRPC_BASE_NODE_ADDRESS: "0.0.0.0:18142"
TARI_BASE_NODE__DIBBLER__GRPC_ENABLED: "1"
TARI_DIBBLER__BASE_NODE__DATA_DIR: "/blockchain/dibbler"
ports:
- 18189:18189
- 18142:18142
Expand Down Expand Up @@ -64,12 +52,6 @@ services:
TERM: "linux"
TARI_WALLET_PASSWORD: ${TARI_WALLET_PASSWORD:-tari}
TARI_NETWORK: ${TARI_NETWORK:-dibbler}
TARI_WALLET__DIBBLER__TOR_CONTROL_AUTH: "password=${TOR_CONTROL_AUTH:-tari}"
TARI_WALLET__DIBBLER__TOR_CONTROL_ADDRESS: "/dns4/tor/tcp/9051"
TARI_WALLET__DIBBLER__TOR_SOCKS_ADDRESS_OVERRIDE: "/dns4/tor/tcp/9050"
TARI_WALLET__DIBBLER__TOR_FORWARD_ADDRESS: "/dns4/wallet/tcp/18188"
TARI_WALLET__DIBBLER__TCP_LISTENER_ADDRESS: "/dns4/wallet/tcp/18188"
TARI_BASE_NODE__DIBBLER__GRPC_CONSOLE_WALLET_ADDRESS: "0.0.0.0:18143"
command: ["--non-interactive"]
ports:
- 18188:18188
Expand Down Expand Up @@ -97,9 +79,8 @@ services:
TARI_NETWORK: ${TARI_NETWORK}
TARI_MINER__NUM_MINING_THREADS: 2
TARI_MINER__MINE_ON_TIP_ONLY: 1
TARI_BASE_NODE__DIBBLER__GRPC_BASE_NODE_ADDRESS: "/dns4/base_node/tcp/18142"
TARI_BASE_NODE__DIBBLER__GRPC_CONSOLE_WALLET_ADDRESS: "/dns4/wallet/tcp/18143"
TARI_WALLET__GRPC_ADDRESS: "/dns4/wallet/tcp/18143"
TARI_MINER__BASE_NODE_ADDR: "/dns4/base_node/tcp/18142"
TARI_MINER__WALLET_ADDR: "/dns4/wallet/tcp/18143"
command: []
depends_on:
- base_node
Expand Down Expand Up @@ -164,14 +145,12 @@ services:
APP_EXEC: tari_merge_mining_proxy
WAIT_FOR_TOR: 0
TARI_NETWORK: ${TARI_NETWORK}
TARI_BASE_NODE__DIBBLER__GRPC_BASE_NODE_ADDRESS: "/dns4/base_node/tcp/18142"
TARI_BASE_NODE__DIBBLER__GRPC_CONSOLE_WALLET_ADDRESS: "/dns4/wallet/tcp/18143"
TARI_WALLET__GRPC_ADDRESS: "/dns4/wallet/tcp/18143"
TARI_MERGE_MINING_PROXY__DIBBLER__MONEROD_URL: ${TARI_MONEROD_URL:-["http://stagenet.community.xmr.to:38081","http://monero-stagenet.exan.tech:38081","http://stagenet.xmr-tw.org:38081","http://xmr-lux.boldsuck.org:38081","http://singapore.node.xmr.pm:38081"]}
TARI_MERGE_MINING_PROXY__DIBBLER__MONEROD_USERNAME: ${TARI_MONEROD_USERNAME}
TARI_MERGE_MINING_PROXY__DIBBLER__MONEROD_PASSWORD: ${TARI_MONEROD_PASSWORD}
TARI_MERGE_MINING_PROXY__DIBBLER__MONEROD_USE_AUTH: ${TARI_MONEROD_USE_AUTH:-0}
TARI_MERGE_MINING_PROXY__DIBBLER__PROXY_HOST_ADDRESS: "0.0.0.0:18081"
TARI_MERGE_MINING_PROXY__BASE_NODE_GRPC_ADDRESS: "/dns4/base_node/tcp/18142"
TARI_MERGE_MINING_PROXY__CONSOLE_WALLET_GRPC_ADDRESS: "/dns4/wallet/tcp/18143"
TARI_MERGE_MINING_PROXY__MONEROD_USERNAME: ${TARI_MONEROD_USERNAME}
TARI_MERGE_MINING_PROXY__MONEROD_PASSWORD: ${TARI_MONEROD_PASSWORD}
TARI_MERGE_MINING_PROXY__MONEROD_USE_AUTH: ${TARI_MONEROD_USE_AUTH:-0}
TARI_MERGE_MINING_PROXY__LISTENER_ADDRESS: "/ip4/0.0.0.0/tcp/18081"
depends_on:
- base_node
- wallet
Expand Down
39 changes: 32 additions & 7 deletions applications/launchpad/docker_rig/mm_proxy.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
FROM quay.io/tarilabs/rust_tari-build-with-deps:nightly-2021-11-01 as builder
FROM rust:1.60-buster as builder

ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt -y install \
apt-transport-https \
bash \
ca-certificates \
curl \
gpg \
iputils-ping \
less \
libreadline-dev \
libsqlite3-0 \
openssl \
telnet \
cargo \
clang \
cmake

RUN apt update && apt upgrade -y && apt clean


WORKDIR /tari

# Adding only necessary things up front and copying the entrypoint script last
Expand Down Expand Up @@ -31,22 +52,27 @@ ADD infrastructure infrastructure
ADD dan_layer dan_layer
ADD meta meta

# Cusomised build
RUN cargo build --bin tari_merge_mining_proxy --release --locked --features "$FEATURES"
RUN cargo build --bin tari_merge_mining_proxy --release --features $FEATURES --locked

# Create a base minimal image for the executables
FROM quay.io/bitnami/minideb:bullseye as base
# Disable Prompt During Packages Installation
ARG VERSION=1.0.1
# Disable Prompt During Packages Installation
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt -y install \
apt-transport-https \
bash \
ca-certificates \
curl \
openssl
gpg \
iputils-ping \
less \
libreadline8 \
libreadline-dev \
libsqlite3-0 \
openssl \
telnet

# Now create a new image with only the essentials and throw everything else away
FROM base
RUN groupadd -g 1000 tari && useradd -s /bin/bash -u 1000 -g 1000 tari
USER tari
Expand All @@ -58,4 +84,3 @@ COPY --from=builder /tari/target/release/$APP_EXEC /usr/bin/
COPY applications/launchpad/docker_rig/start_tari_app.sh /usr/bin/start_tari_app.sh

ENTRYPOINT [ "start_tari_app.sh", "-c", "/var/tari/config/config.toml", "-b", "/var/tari/mm_proxy" ]
# CMD [ "--non-interactive-mode" ]
46 changes: 36 additions & 10 deletions applications/launchpad/docker_rig/sha3_miner.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
FROM quay.io/tarilabs/rust_tari-build-with-deps:nightly-2021-11-01 as builder
FROM rust:1.60-buster as builder

ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt -y install \
apt-transport-https \
bash \
ca-certificates \
curl \
gpg \
iputils-ping \
less \
libreadline-dev \
libsqlite3-0 \
openssl \
telnet \
cargo \
clang \
cmake

RUN apt update && apt upgrade -y && apt clean


WORKDIR /tari

# Adding only necessary things up front and copying the entrypoint script last
Expand Down Expand Up @@ -39,15 +60,19 @@ ARG VERSION=1.0.1
# Disable Prompt During Packages Installation
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt -y install \
apt-transport-https \
bash \
ca-certificates \
curl \
gpg \
iputils-ping \
less \
openssl
# Now create a new image with only the essentials and throw everything else away
apt-transport-https \
bash \
ca-certificates \
curl \
gpg \
iputils-ping \
less \
libreadline8 \
libreadline-dev \
libsqlite3-0 \
openssl \
telnet

FROM base
RUN groupadd -g 1000 tari && useradd -s /bin/bash -u 1000 -g 1000 tari
USER tari
Expand All @@ -59,3 +84,4 @@ COPY --from=builder /tari/target/release/$APP_EXEC /usr/bin/
COPY applications/launchpad/docker_rig/start_tari_app.sh /usr/bin/start_tari_app.sh

ENTRYPOINT [ "start_tari_app.sh", "-c", "/var/tari/config/config.toml", "-b", "/var/tari/sha3_miner" ]