Skip to content
This repository was archived by the owner on Oct 10, 2020. It is now read-only.

Allow arbitrary files in test images.#97

Merged
rhatdan merged 1 commit intoprojectatomic:masterfrom
willmtemple:testing-improvements
Jul 21, 2015
Merged

Allow arbitrary files in test images.#97
rhatdan merged 1 commit intoprojectatomic:masterfrom
willmtemple:testing-improvements

Conversation

@willmtemple
Copy link

This patch will allow arbitrary files to be inserted into the test images.

If you have a file hierarchy that looks like this:

  • test-images/
    • Dockerfile.
    • Dockerfile..d/
      • foo

Then the directory Dockerfile.<id>.d will be available to the image at build time, and can be added to the image, e.g. (with an of 'foo') as
Dockerfile.foo:

FROM rhel7:7.1-9
MAINTAINER "William Temple <wtemple at redhat dot com>"

ADD ./Dockerfile.foo.d/some_script.sh /usr/bin/some_script
RUN "chmod +x /usr/bin/some_script"

The script will also now rebuild any test-images whose files have changed.

@rhatdan RFC. I think this is the cleanest way to add arbitrary files to these test images.

@sallyom This should enable you to add scripts/etc. to the test images, and you should then be able to take the "docker build" logic out of your test script.

Signed-off-by: William Temple wtemple@redhat.com

Signed-off-by: William Temple <wtemple@redhat.com>
@rhatdan
Copy link
Member

rhatdan commented Jul 21, 2015

LGTM

rhatdan added a commit that referenced this pull request Jul 21, 2015
Allow arbitrary files in test images.
@rhatdan rhatdan merged commit 793db37 into projectatomic:master Jul 21, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants