Skip to content

Commit

Permalink
add Rococo node docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
demisx committed Sep 12, 2022
1 parent e20b67e commit d525ea2
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 13 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,36 @@ jobs:
date_tag=$(date +'%Y%m%d-%H%M')
echo ${date_tag}
echo "TAG=${date_tag}" >> $GITHUB_ENV
- name: Build and push Frequency image
# - name: Build and push Frequency image
# if: matrix.target == 'build-node'
# id: docker_build_frequency
# uses: docker/build-push-action@v3
# with:
# context: .
# push: true
# file: Dockerfile
# tags: |
# frequencychain/frequency:${{ env.TAG }}
# frequencychain/frequency:latest
- name: Build and push Frequency image in instant seal mode
if: matrix.target == 'build-node'
id: docker_build_frequency
id: docker_build_instant_seal_node
uses: docker/build-push-action@v3
with:
context: .
push: true
file: Dockerfile
file: ./docker/instant-seal-node.dockerfile
tags: |
frequencychain/frequency:${{ env.TAG }}
frequencychain/frequency:latest
- name: Build and push Frequency image in instant seal mode
frequencychain/instant-seal-node:${{env.TAG}}
frequencychain/instant-seal-node:latest
- name: Build and push Frequency image for Rococo testnet
if: matrix.target == 'build-node'
id: docker_build_instant_seal_node
id: docker_build_rococo_node
uses: docker/build-push-action@v3
with:
context: .
push: true
file: ./docker/instant-seal-node.dockerfile
file: ./docker/rococo-node.dockerfile
tags: |
frequencychain/instant-seal-node:${{env.TAG}}
frequencychain/instant-seal-node:latest
frequencychain/rococo-node:${{ env.TAG }}
frequencychain/rococo-node:latest
6 changes: 3 additions & 3 deletions docker/instant-seal-node.dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Requires to run from repository root and to copy the binary in the build folder
FROM ubuntu:20.04 AS base
LABEL maintainer="Frequency Team"
LABEL description="Binary for Frequency parachain"
LABEL description="Frequency parachain node in instant seal mode"

RUN apt-get update && apt-get install -y ca-certificates && update-ca-certificates

Expand All @@ -13,8 +13,8 @@ RUN useradd -m -u 1000 -U -s /bin/sh -d /frequency frequency && \
USER frequency

COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --chown=frequency target/release/frequency /frequency/
RUN chmod uog+x /frequency/frequency
COPY --chown=frequency target/release/frequency ./frequency/
RUN chmod uog+x ./frequency/frequency

# 9933 P2P port
# 9944 for RPC call
Expand Down
44 changes: 44 additions & 0 deletions docker/rococo-node.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Requires to run from repository root and to copy the binary in the build folder
FROM ubuntu:20.04 AS base
LABEL maintainer="Frequency Team"
LABEL description="Frequency parachain full node for Rococo testnet"

RUN apt-get update && apt-get install -y ca-certificates && update-ca-certificates

FROM ubuntu:20.04
RUN useradd -m -u 1000 -U -s /bin/sh -d /frequency frequency && \
mkdir /data && \
chown -R frequency:frequency /data

# RUN apt-get update && \
# apt-get install -y jq curl tini

USER frequency

COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
# COPY --chown=frequency target/release/frequency.amd64 ./frequency/frequency
COPY --chown=frequency target/release/frequency ./frequency/
RUN chmod uog+x ./frequency/frequency

# 9933 P2P port
# 9944 for RPC call
# 30333 for Websocket
EXPOSE 9933 9944 30333

VOLUME ["/data"]

ENTRYPOINT ["/frequency/frequency"]
CMD [ "--force-authoring", \
"--chain=frequency-rococo", \
"--base-path=/data", \
"--wasm-execution=compiled", \
"--execution=wasm", \
"--port=30333", \
"--rpc-port=9933", \
"--ws-port=9944", \
"--rpc-external", \
"--rpc-cors=all", \
"--ws-external", \
"--rpc-methods=Unsafe", \
"--state-cache-size=0" \
]

0 comments on commit d525ea2

Please sign in to comment.