Skip to content

Instantly share code, notes, and snippets.

@Ami-OS
Ami-OS / export-source-from-docker-tag.sh
Last active November 7, 2022 15:50 — forked from princefishthrower/export-source-from-docker-tag.sh
Export the source code from any Docker tag!
#!/bin/bash
#
# Extracts the source code of any Docker tag!
# Inspired by Sambhav Jain's post on DEV: https://dev.to/sambhav2612/reverse-engineering-a-docker-image-i8c
# Simply pass:
# 1. The desired Docker image tag you want to get the source code for
# 2. The target folder to put the source code in
#
# Example usage:
# ./export-source-from-docker-tag.sh gcr.io/google-samples/gb-frontend:v4 docker-source