Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit 48197a6

Browse files
authored
Merge pull request #426 from paritytech/wk-parity-keyring-image
New `parity-keyring` image
2 parents 9c67701 + 60cc0d3 commit 48197a6

File tree

4 files changed

+52
-2
lines changed

4 files changed

+52
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
.*.swp
2+
.env

dockerfiles/gnupg/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ FROM docker.io/library/ubuntu:latest
66
ARG GPG_KEYID=9D4B2B6EB8F97156D19669A9FF0812D491B96798
77
ARG VCS_REF=master
88
ARG BUILD_DATE=""
9+
ARG UID=1000
10+
ARG GID=1000
911

1012
# metadata
1113
LABEL summary="Base image for GnuPG operations" \
@@ -22,8 +24,8 @@ LABEL summary="Base image for GnuPG operations" \
2224
RUN apt-get update && apt-get install -yq --no-install-recommends bash ca-certificates curl gnupg
2325

2426
RUN set -x \
25-
&& groupadd -g 1000 nonroot \
26-
&& useradd -u 1000 -g 1000 -s /bin/bash -m nonroot
27+
&& groupadd -g $GID nonroot \
28+
&& useradd -u $UID -g $GID -s /bin/bash -m nonroot
2729

2830
USER nonroot:nonroot
2931

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
ARG REGISTRY_PATH=docker.io/paritytech
2+
3+
FROM docker.io/paritytech/gnupg:latest
4+
5+
# 'Parity Security Team <[email protected]>'
6+
ARG KEY_ID=9D4B2B6EB8F97156D19669A9FF0812D491B96798
7+
ARG KEY_SERVER=hkps://keys.mailvelope.com
8+
ARG VCS_REF=master
9+
ARG BUILD_DATE=""
10+
11+
# metadata
12+
LABEL summary="Base image with Parity-Keyring" \
13+
name="${REGISTRY_PATH}/parity-keyring" \
14+
maintainer="[email protected]" \
15+
version="1.0" \
16+
description="Parity Keyring base container" \
17+
io.parity.image.vendor="Parity Technologies" \
18+
io.parity.image.source="https://github.com/paritytech/scripts/blob/${VCS_REF}/dockerfiles/parity-keyring/Dockerfile" \
19+
io.parity.image.documentation="https://github.com/paritytech/scripts/blob/${VCS_REF}/dockerfiles/parity-keyring/README.md" \
20+
io.parity.image.revision="${VCS_REF}" \
21+
io.parity.image.created="${BUILD_DATE}"
22+
23+
USER root
24+
25+
RUN gpg --recv-keys --keyserver $KEY_SERVER $KEY_ID && \
26+
gpg --export $KEY_ID > /usr/share/keyrings/parity.gpg && \
27+
echo 'deb [signed-by=/usr/share/keyrings/parity.gpg] https://releases.parity.io/deb release main' > /etc/apt/sources.list.d/parity.list && \
28+
apt update && \
29+
apt install parity-keyring
30+
31+
USER nonroot:nonroot
32+
33+
RUN gpg /usr/share/keyrings/parity.gpg | grep -v expired
34+
35+
WORKDIR /home/nonroot
36+
CMD ["/bin/bash"]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# parity-keyring
2+
3+
A base Docker image based on [our gnupg image](https://hub.docker.com/repository/docker/paritytech/gnupg) and coming pre-installed with the parity keyring.
4+
5+
[Click here](https://hub.docker.com/repository/docker/paritytech/parity-keyring) for the registry.
6+
7+
## Usage
8+
9+
```
10+
docker run --rm -it docker.io/paritytech/parity-keyring gpg --list-keys $KEY_ID
11+
```

0 commit comments

Comments
 (0)