Skip to content

Instantly share code, notes, and snippets.

@arsalanses
Last active February 8, 2025 08:54
Show Gist options
  • Select an option

  • Save arsalanses/3bc7972ef224389b6413dbd210eb549e to your computer and use it in GitHub Desktop.

Select an option

Save arsalanses/3bc7972ef224389b6413dbd210eb549e to your computer and use it in GitHub Desktop.
nerdctl image encrypt
#!/bin/sh
set -x
nerdctl pull --unpack=false reg.example.ir/nginx:encrypted
nerdctl image decrypt --key=dockerkey.pem reg.example.ir/nginx:encrypted reg.example.ir/nginx:decrypted
#!/bin/sh
set -x
openssl genrsa -out dockerkey.pem
openssl rsa -in dockerkey.pem -pubout -out dockerkey.pub
nerdctl pull nginx:latest
nerdctl image encrypt --recipient=jwe:dockerkey.pub --platform=linux/amd64 nginx reg.example.ir/nginx:encrypted
nerdctl push reg.example.ir/nginx:encrypted
nerdctl rmi nginx:latest reg.example.ir/nginx:encrypted
#!/bin/sh
set -x
wget https://github.com/containerd/nerdctl/releases/download/v2.0.3/nerdctl-2.0.3-linux-amd64.tar.gz
wget https://github.com/containernetworking/plugins/releases/download/v1.6.2/cni-plugins-linux-amd64-v1.6.2.tgz
tar Cxzvvf /opt/cni/bin cni-plugins-linux-amd64-v1.6.2.tgz
tar Cxzvvf /usr/local/bin nerdctl-2.0.3-linux-amd64.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment