diff --git a/Dockerfile b/Dockerfile
index cfe29a65fbf..825f8ef38af 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -33,9 +33,16 @@ WORKDIR /out
 ADD https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-${TARGETARCH}.tar.gz .
 RUN tar xvf hugo_extended_${HUGO_VERSION}_linux-${TARGETARCH}.tar.gz
 
+# git-src clones the OSS projects in order to include
+# code snippets into the docs.
+FROM base AS git-src-oss
+WORKDIR /git-src
+RUN git clone https://github.com/testcontainers/testcontainers-go.git
+
 # build-base is the base stage used for building the site
 FROM base AS build-base
 WORKDIR /project
+COPY --from=git-src-oss /git-src /project/git-src
 COPY --from=hugo /out/hugo /bin/hugo
 COPY --from=npm /out/node_modules node_modules
 COPY . .
diff --git a/content/manuals/testcontainers.md b/content/manuals/testcontainers.md
index 73b538a2750..4b00c2e5605 100644
--- a/content/manuals/testcontainers.md
+++ b/content/manuals/testcontainers.md
@@ -42,6 +42,8 @@ Testcontainers provide support for the most popular languages, and Docker sponso
 
 The rest are community-driven and maintained by independent contributors.
 
+{{< embedded language="go" source="/git-src/testcontainers-go/modules/redis/examples_test.go" id="runRedisContainer" >}}
+
 ### Prerequisites
 
 Testcontainers requires a Docker-API compatible container runtime. 
diff --git a/layouts/shortcodes/embedded.html b/layouts/shortcodes/embedded.html
new file mode 100644
index 00000000000..405b0b8c293
--- /dev/null
+++ b/layouts/shortcodes/embedded.html
@@ -0,0 +1,65 @@
+{{ $language := .Get "language" }}
+{{ $source := .Get "source" }}
+{{ $options := .Get "options" }}
+{{ $id := .Get "id" }}
+{{ $startTag := printf "START %s" $id }}
+{{ $endTag := printf "END %s" $id }}
+
+{{ if and $source (strings.Contains $source "testcontainers-go") }}
+    {{/*
+        If the source is a testcontainers-go file, we need to use a different tag. In example:
+
+        // runRedisContainer {
+        //     ...
+        // }
+    */}}
+    {{ $startTag = printf "// %s {" $id }}
+    {{ $endTag = printf "// }" }}
+{{ end }}
+
+{{ with $source | readFile }}
+    {{ $snippet := . }}
+
+    {{ if $id }}
+        {{ $lines := split $snippet "\n" }}
+
+        {{ $startl := -1 }}
+        {{ $endl := -1 }}
+
+        {{/* Find the lines that ends with the start and end tags. */}}
+        {{ range $index, $line := $lines }}
+            {{ if hasSuffix (strings.TrimSpace $line) $startTag }}
+                {{ $startl = $index }}
+            {{ else if hasSuffix (strings.TrimSpace $line) $endTag }}
+                {{ $endl = $index }}
+            {{ end }}
+        {{ end }}
+ 
+        {{/* Let's add some basic assertions. */}}
+        {{ if lt $startl 0 }}
+            {{ errorf "Named snippet '%s' is missing START tag (searched %d lines)" $id (len $lines) }}
+        {{ end }}
+
+        {{ if lt $endl 0 }}
+            {{ errorf "Named snippet '%s' is missing END tag (searched %d lines)" $id (len $lines) }}
+        {{ end }}
+
+        {{ if le $endl $startl }}
+            {{ errorf "Named snippet '%s': END tag (line %d) must come after START tag (line %d)" $id $endl $startl }}
+        {{ end }}
+
+        {{/* Size of the snippet in number of lines. */}}
+        {{ $snippetLen := sub (sub $endl $startl) 1 }}
+
+        {{/* Create slice with only the lines between the tags. */}}
+        {{ $includedLines := first $snippetLen (after (add $startl 1) $lines) }}
+
+        {{/* Join the lines into the final snippet. */}}
+        {{ $snippet = delimit $includedLines "\n" }}
+        {{ $markdown := printf "```%s\n%s\n```" $language $snippet }}
+        {{ $markdown | markdownify }}
+    {{ else }}
+        {{ $markdown := printf "```%s\n%s\n```" $language . }}
+        {{ $markdown | markdownify }}
+    {{ end }}
+{{ end }}