Skip to content

Instantly share code, notes, and snippets.

@spurti-chopra
Last active August 25, 2018 12:22
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 spurti-chopra/553da6f0dad6cca3017a30268e1de81b to your computer and use it in GitHub Desktop.
Save spurti-chopra/553da6f0dad6cca3017a30268e1de81b to your computer and use it in GitHub Desktop.
### Below is used for representation purpose and is not in any way a working Dockerfile.
### Build the artifact using Dockerfile.build
docker build -t artifact-build -f Dockerfile.build
### Create the container using the image to obtain artifact
docker create --name artifact-container artifact-build
### Copy the artifact from container to host machine
docker cp artifact-conatiner:<src_path_of_artifact> <host_machine_path>
### Make sure your Dockerfile has an instruction to copy the artifact from host_machine_path
docker build -t app-image -d Dockerfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment