Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move migrate binary to /usr/local/bin in Dockerfile #356

Merged
merged 1 commit into from
Mar 15, 2020
Merged

Move migrate binary to /usr/local/bin in Dockerfile #356

merged 1 commit into from
Mar 15, 2020

Conversation

jace-ys
Copy link
Contributor

@jace-ys jace-ys commented Mar 14, 2020

Move the migrate binary to /usr/local/bin in Dockerfile, so it
can be invoked from anywhere - this makes it easier to write
entrypoint scripts that call migrate that can can be used
consistently both locally and in Docker containers.

@jace-ys
Copy link
Contributor Author

jace-ys commented Mar 14, 2020

This PR addresses issue #304. I couldn't see anywhere else in the code / documentation that I needed to modify, so please point out if I missed something!

@jace-ys jace-ys changed the title Move migrate binary to bin in Dockerfile Move migrate binary to /usr/local/bin in Dockerfile Mar 14, 2020
@jace-ys jace-ys changed the title Move migrate binary to /usr/local/bin in Dockerfile Move migrate binary to /usr/local/bin in Dockerfile Mar 14, 2020
@coveralls
Copy link

coveralls commented Mar 14, 2020

Pull Request Test Coverage Report for Build 722

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 53.191%

Totals Coverage Status
Change from base Build 716: 0.0%
Covered Lines: 2559
Relevant Lines: 4811

💛 - Coveralls

@jace-ys
Copy link
Contributor Author

jace-ys commented Mar 14, 2020

I just realised that this breaks people's assumption of where the binary exists, which might not be backwards compatible with scripts / code that depend on the binary existing as /migrate (not sure how big that audience is).

To preserve backwards compatibility, what we could do instead:

  1. COPY the binary to both /migrate AND /usr/local/bin/migrate
  2. COPY the binary to /usr/local/bin/migrate and create a symlink to /migrate

What do you guys think is the preferred option here?

@dhui
Copy link
Member

dhui commented Mar 14, 2020

Thanks for the PR!

To preserve backwards compatibility, what we could do instead:

  1. COPY the binary to both /migrate AND /usr/local/bin/migrate
  2. COPY the binary to /usr/local/bin/migrate and create a symlink to /migrate

Use a symlink to reduce image size

Move the migrate binary to `/usr/local/bin` in the Dockerfile, so
it can be invoked from anywhere - this makes it easier to write
entrypoint scripts which call `migrate` that can be used
consistently both locally and in Docker containers.

To preserve backwards compatibility for anything that depends on
`migrate` existing at its existing path, we create a symlink to the
`/usr/local/bin/migrate` binary.
@jace-ys
Copy link
Contributor Author

jace-ys commented Mar 14, 2020

Use a symlink to reduce image size

Have updated the PR to now create the symlink! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants