mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 01:41:09 +00:00
* exclude polkadot-parachain .asc and .sha256 from .dockerignore * refactor docker image creation GHA * add debug * try without quotes * test action * add quotes * fix quotes atumated image publishing GHA * delete old unused part --------- Co-authored-by: Chevdor <chevdor@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
FROM docker.io/library/ubuntu:20.04
|
||||
FROM docker.io/parity/base-bin
|
||||
|
||||
# metadata
|
||||
ARG VCS_REF
|
||||
@@ -17,35 +17,20 @@ LABEL io.parity.image.authors="devops-team@parity.io" \
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
# install tools and dependencies
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
libssl1.1 \
|
||||
ca-certificates \
|
||||
curl && \
|
||||
# apt cleanup
|
||||
apt-get autoremove -y && \
|
||||
apt-get clean && \
|
||||
find /var/lib/apt/lists/ -type f -not -name lock -delete; \
|
||||
# add user and link ~/.local/share/polkadot to /data
|
||||
useradd -m -u 1000 -U -s /bin/sh -d /polkadot polkadot && \
|
||||
mkdir -p /data /polkadot/.local/share && \
|
||||
chown -R polkadot:polkadot /data && \
|
||||
ln -s /data /polkadot/.local/share/polkadot && \
|
||||
mkdir -p /specs
|
||||
USER root
|
||||
|
||||
RUN mkdir -p /specs
|
||||
|
||||
# add polkadot-parachain binary to the docker image
|
||||
COPY ./target/release/polkadot-parachain /usr/local/bin
|
||||
COPY ./target/release/polkadot-parachain.asc /usr/local/bin
|
||||
COPY ./target/release/polkadot-parachain.sha256 /usr/local/bin
|
||||
COPY ./target/release-artifacts/* /usr/local/bin
|
||||
COPY ./parachains/chain-specs/*.json /specs/
|
||||
|
||||
USER polkadot
|
||||
USER parity
|
||||
|
||||
# check if executable works in this container
|
||||
RUN /usr/local/bin/polkadot-parachain --version
|
||||
|
||||
EXPOSE 30333 9933 9944
|
||||
VOLUME ["/polkadot"]
|
||||
EXPOSE 30333 9933 9944 9615
|
||||
VOLUME ["/polkadot", "/specs"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/polkadot-parachain"]
|
||||
|
||||
@@ -2,5 +2,8 @@
|
||||
|
||||
OWNER=${OWNER:-parity}
|
||||
IMAGE_NAME=${IMAGE_NAME:-polkadot-parachain}
|
||||
docker build --no-cache --build-arg IMAGE_NAME=$IMAGE_NAME -t $OWNER/$IMAGE_NAME -f ./docker/injected.Dockerfile .
|
||||
docker images | grep $IMAGE_NAME
|
||||
docker build --no-cache \
|
||||
--build-arg IMAGE_NAME=$IMAGE_NAME \
|
||||
-t $OWNER/$IMAGE_NAME \
|
||||
-f ./docker/injected.Dockerfile \
|
||||
. && docker images
|
||||
|
||||
Reference in New Issue
Block a user