Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.*.swp
.env
6 changes: 4 additions & 2 deletions dockerfiles/gnupg/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ FROM docker.io/library/ubuntu:latest
ARG GPG_KEYID=9D4B2B6EB8F97156D19669A9FF0812D491B96798
ARG VCS_REF=master
ARG BUILD_DATE=""
ARG UID=1000
ARG GID=1000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: why make these args?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we had issues with the deb/rpm image signing due to running rootless and using the wrong UID.
For now, the change does nothing but an easy fix could be to align the UID of the image with our expectations in the cleanroom. That would be another PR then.


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

RUN set -x \
&& groupadd -g 1000 nonroot \
&& useradd -u 1000 -g 1000 -s /bin/bash -m nonroot
&& groupadd -g $GID nonroot \
&& useradd -u $UID -g $GID -s /bin/bash -m nonroot

USER nonroot:nonroot

Expand Down
36 changes: 36 additions & 0 deletions dockerfiles/parity-keyring/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
ARG REGISTRY_PATH=docker.io/paritytech

FROM docker.io/paritytech/gnupg:latest

# 'Parity Security Team <[email protected]>'
ARG KEY_ID=9D4B2B6EB8F97156D19669A9FF0812D491B96798
ARG KEY_SERVER=hkps://keys.mailvelope.com
ARG VCS_REF=master
ARG BUILD_DATE=""

# metadata
LABEL summary="Base image with Parity-Keyring" \
name="${REGISTRY_PATH}/parity-keyring" \
maintainer="[email protected]" \
version="1.0" \
description="Parity Keyring base container" \
io.parity.image.vendor="Parity Technologies" \
io.parity.image.source="https://github.com/paritytech/scripts/blob/${VCS_REF}/dockerfiles/parity-keyring/Dockerfile" \
io.parity.image.documentation="https://github.com/paritytech/scripts/blob/${VCS_REF}/dockerfiles/parity-keyring/README.md" \
io.parity.image.revision="${VCS_REF}" \
io.parity.image.created="${BUILD_DATE}"

USER root

RUN gpg --recv-keys --keyserver $KEY_SERVER $KEY_ID && \
gpg --export $KEY_ID > /usr/share/keyrings/parity.gpg && \
echo 'deb [signed-by=/usr/share/keyrings/parity.gpg] https://releases.parity.io/deb release main' > /etc/apt/sources.list.d/parity.list && \
apt update && \
apt install parity-keyring

USER nonroot:nonroot

RUN gpg /usr/share/keyrings/parity.gpg | grep -v expired

WORKDIR /home/nonroot
CMD ["/bin/bash"]
11 changes: 11 additions & 0 deletions dockerfiles/parity-keyring/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# parity-keyring

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.

[Click here](https://hub.docker.com/repository/docker/paritytech/parity-keyring) for the registry.

## Usage

```
docker run --rm -it docker.io/paritytech/parity-keyring gpg --list-keys $KEY_ID
```