A solution for running Podman inside Docker containers with Node.js, specifically designed for AWS Amplify build environments. This project enables container builds in AWS Amplify by implementing a Node.js + Podman-in-Docker setup using a rootless configuration.
AWS Amplify doesn't support Docker builds out of the box. This project provides a workaround by implementing Podman (a daemonless container engine) inside a Node.js-based Docker container. The implementation uses a rootless Podman configuration on top of a Debian-based Node.js image.
To use this in AWS Amplify:
caioquirino/amplify_pind:node22)The pre-built images are available on Docker Hub:
docker pull caioquirino/amplify-pind:latest
Available tags:
latest: Latest stable release (currently Node.js 22)node22: Node.js v22.x based imagenode20: Node.js v20.x based imagenode18: Node.js v18.x based imageEach Node.js version tag is available for both x86_64 and arm64 architectures.
Example using a specific Node.js version:
# For Node.js 22
docker pull caioquirino/amplify-pind:node22
# For Node.js 20
docker pull caioquirino/amplify-pind:node20
# For Node.js 18
docker pull caioquirino/amplify-pind:node18
The main configuration file for Podman containers, setting up:
docker pull caioquirino/amplify-pind:latest
docker run --privileged -v /var/lib/containers -v /home/node/.local/share/containers caioquirino/amplify-pind:latest
If you need to customize the image:
The main configuration file for Podman containers, setting up:
docker build -t amplify-pind .
docker run --privileged -v /var/lib/containers -v /home/node/.local/share/containers amplify-pind
_CONTAINERS_USERNS_CONFIGURED: Container namespace configurationBUILDAH_ISOLATION: Set to "chroot" for build isolationDOCKER_HOST: Unix socket path for Docker API compatibilityThe container requires two volume mounts:
/var/lib/containers: For container storage/home/node/.local/share/containers: For user-specific container dataContributions are welcome! Please feel free to submit pull requests.
This project is licensed under the GNU General Public License - see the LICENSE file for details.
Content type
Image
Digest
sha256:130dfcdce…
Size
605.4 MB
Last updated
over 1 year ago
docker pull caioquirino/amplify_pind