Last active
February 8, 2025 08:54
-
-
Save arsalanses/3bc7972ef224389b6413dbd210eb549e to your computer and use it in GitHub Desktop.
nerdctl image encrypt
This file contains hidden or 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
| #!/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 |
This file contains hidden or 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
| #!/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 |
This file contains hidden or 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
| #!/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