Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Delete answers.txt before building the docker image #75

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

mikemonteith
Copy link
Contributor

It might seem that adding "answers.txt" to the .dockerignore file would be enough to
prevent answers.txt from being built into the image, however:

  1. If the .dockerignore file already exists and doesn't end in a newline, answers.txt is
    added to the last line rather than being added as it's own line.

  2. If there is no .dockerignore file, docker falls back to using the .gitignore file. This script
    should not be creating a one-line .dockerignore file if one doesn't already exist.

@mikemonteith mikemonteith force-pushed the handle-secrets-more-safely branch from 6df7214 to a910883 Compare June 5, 2020 09:02
It might seem that adding "answers.txt" to the .dockerignore file would be enough to
prevent answers.txt from being built into the image, however:

1. If the .dockerignore file already exists and doesn't end in a newline, answers.txt is
added to the last line rather than being added as it's own line.

2. If there is no .dockerignore file, docker falls back to using the .gitignore file. This script
should not be creating a one-line .dockerignore file if one doesn't already exist.
@mikemonteith mikemonteith force-pushed the handle-secrets-more-safely branch from a910883 to 1597699 Compare June 5, 2020 09:05
Copy link
Contributor

@arctangent arctangent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

Copy link

@tomdoughty tomdoughty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@mikemonteith mikemonteith merged commit 689a60c into master Jun 5, 2020
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.

3 participants