Skip to content

Instantly share code, notes, and snippets.

@kylemanna
Created April 2, 2020 03:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylemanna/977d01362b9184381516ab95e336b162 to your computer and use it in GitHub Desktop.
Save kylemanna/977d01362b9184381516ab95e336b162 to your computer and use it in GitHub Desktop.
#
# Proof of Concept
#
# Compose a docker image of an upstream images so that binaries packages in one
# image can be incorporated into another.
#
# TODO This copies, would be nice if there was a way to attach an image to a
# container like `docker run --volumes-from` does for containers.
# These FROMs used as a way to distribute files via an image
FROM busybox:1.31.1 AS bb
FROM ubuntu:20.04 AS ub20
# This is the base for the next steps
FROM alpine:3
# Copy the files form the busybox image to demonstrate it works
COPY --from=bb /bin/busybox /opt/magick/busybox
COPY --from=ub20 / /opt/magick/ubuntu
# By default list the directory we are demonstrating
CMD ls -lR /opt/magick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment