This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flag files to be deleted and changes to be done
- Loading branch information
Showing
10 changed files
with
38 additions
and
26 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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# It would be better using this image to inject generic binaries | ||
# instead of requiring a dockerfile per binary. | ||
# Unfortunately, ENTRYPOINT requires using an ENV | ||
# and the current setup shows limitation: the passed args are ignored. | ||
|
||
FROM docker.io/parity/base-bin | ||
|
||
# This file allows building a Generic container image | ||
# based on one or multiple pre-built Linux binaries. | ||
# Some defaults are set to polkadot but all can be overriden. | ||
|
||
|
||
# metadata | ||
ARG VCS_REF | ||
ARG BUILD_DATE | ||
|
@@ -13,32 +13,43 @@ ARG BINARY=polkadot | |
ARG BIN_FOLDER=. | ||
ARG DOC_URL=https://github.com/paritytech/polkadot | ||
ARG DESCRIPTION="Polkadot: a platform for web3" | ||
ARG AUTHORS="[email protected]" | ||
ARG VENDOR="Parity Technologies" | ||
|
||
LABEL io.parity.image.authors="[email protected]" \ | ||
io.parity.image.vendor="Parity Technologies" \ | ||
io.parity.image.title="${IMAGE_NAME}" \ | ||
io.parity.image.description="${DESCRIPTION}" \ | ||
io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/ci/dockerfiles/binary_injected.Dockerfile" \ | ||
LABEL io.parity.image.authors=${AUTHORS} \ | ||
io.parity.image.vendor="${VENDOR}" \ | ||
io.parity.image.revision="${VCS_REF}" \ | ||
io.parity.image.title="${IMAGE_NAME}" \ | ||
io.parity.image.created="${BUILD_DATE}" \ | ||
io.parity.image.documentation="${DOC_URL}" | ||
io.parity.image.documentation="${DOC_URL}" \ | ||
io.parity.image.description="${DESCRIPTION}" \ | ||
io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/ci/dockerfiles/binary_injected.Dockerfile" | ||
|
||
USER root | ||
WORKDIR /app | ||
|
||
# add polkadot binary to docker image | ||
# sample for polkadot: COPY ./polkadot ./polkadot-*-worker /usr/local/bin/ | ||
COPY entrypoint.sh . | ||
COPY ./$BIN_FOLDER/$BINARY /usr/local/bin/ | ||
RUN chmod a+rwx /usr/local/bin/$BINARY | ||
|
||
USER parity | ||
ENV BINARY=${BINARY} | ||
|
||
# check if executable works in this container | ||
# check that all the executables works in this container | ||
# TODO: There may be several | ||
RUN /usr/local/bin/$BINARY --version | ||
|
||
# TODO: change that, we may have multiple BINARIES | ||
# TODO: we need a VAR for VOLUMES | ||
VOLUME ["/$BINARY"] | ||
|
||
# TODO: we need a VAR for PORTS | ||
# EXPOSE 30333 9933 9944 9615 | ||
|
||
# ENTRYPOINT | ||
ENTRYPOINT ["/app/entrypoint.sh"] | ||
|
||
# We call the help by default | ||
CMD ["--help"] |
File renamed without changes.
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
File renamed without changes.
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 |
---|---|---|
@@ -1,23 +1,22 @@ | ||
version: '3' | ||
services: | ||
polkadot: | ||
image: parity/polkadot:latest | ||
|
||
ports: | ||
- "127.0.0.1:30333:30333/tcp" | ||
- "127.0.0.1:9933:9933/tcp" | ||
image: parity/polkadot:latest | ||
- "127.0.0.1:9944:9944/tcp" | ||
- "127.0.0.1:9615:9615/tcp" | ||
|
||
volumes: | ||
- "polkadot-data:/data" | ||
|
||
command: | | ||
--unsafe-rpc-external | ||
--unsafe-ws-external | ||
--rpc-cors all | ||
--prometheus-external | ||
ports: | ||
- "30333:30333" | ||
- "9933:9933" | ||
- "9944:9944" | ||
- "9615:9615" | ||
|
||
volumes: | ||
polkadot-data: |
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
File renamed without changes.
File renamed without changes.
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