update readme with redirect to upstream substrate docker instructions. remove old docker files (#422)
Co-authored-by: Sacha Lansky <sacha@parity.io>main
parent
120fc85498
commit
700c3a186e
|
@ -1,5 +0,0 @@
|
|||
.devcontainer
|
||||
.github
|
||||
.vscode
|
||||
scripts
|
||||
target
|
|
@ -6,12 +6,6 @@
|
|||
|
||||
.DS_Store
|
||||
|
||||
# The cache for docker container dependency
|
||||
.cargo
|
||||
|
||||
# The cache for chain data in container
|
||||
.local
|
||||
|
||||
# direnv files
|
||||
.envrc
|
||||
.direnv
|
||||
|
|
37
Dockerfile
37
Dockerfile
|
@ -1,37 +0,0 @@
|
|||
# This is an example build stage for the node template. Here we create the binary in a temporary image.
|
||||
|
||||
# This is a base image to build substrate nodes
|
||||
FROM docker.io/paritytech/ci-linux:production as builder
|
||||
|
||||
WORKDIR /node-template
|
||||
COPY . .
|
||||
RUN cargo build --locked --release
|
||||
|
||||
# This is the 2nd stage: a very small image where we copy the binary."
|
||||
FROM docker.io/library/ubuntu:20.04
|
||||
LABEL description="Multistage Docker image for Substrate Node Template" \
|
||||
image.type="builder" \
|
||||
image.authors="you@email.com" \
|
||||
image.vendor="Substrate Developer Hub" \
|
||||
image.description="Multistage Docker image for Substrate Node Template" \
|
||||
image.source="https://github.com/substrate-developer-hub/substrate-node-template" \
|
||||
image.documentation="https://github.com/substrate-developer-hub/substrate-node-template"
|
||||
|
||||
# Copy the node binary.
|
||||
COPY --from=builder /node-template/target/release/node-template /usr/local/bin
|
||||
|
||||
RUN useradd -m -u 1000 -U -s /bin/sh -d /node-dev node-dev && \
|
||||
mkdir -p /chain-data /node-dev/.local/share && \
|
||||
chown -R node-dev:node-dev /chain-data && \
|
||||
ln -s /chain-data /node-dev/.local/share/node-template && \
|
||||
# unclutter and minimize the attack surface
|
||||
rm -rf /usr/bin /usr/sbin && \
|
||||
# check if executable works in this container
|
||||
/usr/local/bin/node-template --version
|
||||
|
||||
USER node-dev
|
||||
|
||||
EXPOSE 30333 9933 9944 9615
|
||||
VOLUME ["/chain-data"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/node-template"]
|
|
@ -1,17 +0,0 @@
|
|||
version: "3.2"
|
||||
|
||||
services:
|
||||
dev:
|
||||
container_name: node-template
|
||||
image: paritytech/ci-linux:production
|
||||
working_dir: /var/www/node-template
|
||||
ports:
|
||||
- "9944:9944"
|
||||
environment:
|
||||
- CARGO_HOME=/var/www/node-template/.cargo
|
||||
volumes:
|
||||
- .:/var/www/node-template
|
||||
- type: bind
|
||||
source: ./.local
|
||||
target: /root/.local
|
||||
command: bash -c "cargo build --release && ./target/release/node-template --dev --ws-external"
|
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# This script is meant to be run on Unix/Linux based systems
|
||||
set -e
|
||||
|
||||
echo "*** Start Substrate node template ***"
|
||||
|
||||
cd $(dirname ${BASH_SOURCE[0]})/..
|
||||
|
||||
docker-compose down --remove-orphans
|
||||
docker-compose run --rm --service-ports dev $@
|
Loading…
Reference in New Issue