-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Samuele Landi <samuele.landi@kryptotel.net>
- Loading branch information
1 parent
8b5de4c
commit ab98a1b
Showing
40 changed files
with
1,280 additions
and
296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.devcontainer | ||
.github | ||
.vscode | ||
scripts | ||
target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Build and publish a Docker image to ghcr.io | ||
on: | ||
|
||
# publish on releases, e.g. v2.1.13 (image tagged as "2.1.13" - "v" prefix is removed) | ||
release: | ||
types: [ published ] | ||
|
||
# publish on pushes to the main branch (image tagged as "latest") | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
docker_publish: | ||
runs-on: "ubuntu-20.04" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# https://github.com/marketplace/actions/push-to-ghcr | ||
- name: Build and publish a Docker image for ${{ github.repository }} | ||
uses: macbre/push-to-ghcr@master | ||
with: | ||
image_name: ${{ github.repository }} # it will be lowercased internally | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# optionally push to the Docker Hub (docker.io) | ||
# docker_io_token: ${{ secrets.DOCKER_IO_ACCESS_TOKEN }} # see https://hub.docker.com/settings/security | ||
# customize the username to be used when pushing to the Docker Hub | ||
# docker_io_user: foobar # see https://github.com/macbre/push-to-ghcr/issues/14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Docker image for bitgreen parachain image | ||
|
||
# This is a base image to build substrate nodes | ||
FROM docker.io/paritytech/ci-linux:production as builder | ||
|
||
WORKDIR /bitgreen-node | ||
COPY . . | ||
|
||
RUN rustup target add wasm32-unknown-unknown | ||
RUN cargo build -p bitgreen-parachain --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="Docker image for bitgreen parachain" \ | ||
image.type="builder" \ | ||
image.authors="team@bitgreen.org" \ | ||
image.vendor="Bitgreen" \ | ||
image.description="Docker image for bitgreen parachain" | ||
|
||
# Copy the node binary. | ||
COPY --from=builder /bitgreen-node/target/release/bitgreen-parachain /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/bitgreen-node && \ | ||
# unclutter and minimize the attack surface | ||
rm -rf /usr/bin /usr/sbin && \ | ||
# check if executable works in this container | ||
/usr/local/bin/bitgreen-parachain --version | ||
|
||
USER node-dev | ||
|
||
EXPOSE 30333 9933 9944 9615 | ||
VOLUME ["/chain-data"] | ||
|
||
ENTRYPOINT ["/usr/local/bin/bitgreen-parachain"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0x000000000000000000000000000000000000000000000000000000000000000000d8cc41ea079083bec601a4bbe5d03f543eb7b3708acf68fd25aa4ac90b7ba61b03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c11131400 |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.