question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Official Flyway Dockerfile

See original GitHub issue

Would you consider establishing and supporting a Dockerfile for running flyway?

Here is a complete example that I am using in my own projects:

FROM centos:centos7
MAINTAINER ToBeReplaced

# Get flyway
RUN ["curl", "-O", "http://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/3.0/flyway-commandline-3.0.tar.gz"]
RUN ["yum", "install", "-y", "tar"]
RUN ["tar", "-xzf", "flyway-commandline-3.0.tar.gz"]

# Install java and the jdbc postgres driver
RUN ["yum", "install", "-y", "java-1.7.0-openjdk-headless"]
RUN ["yum", "install", "-y", "postgresql-jdbc"]

WORKDIR flyway-3.0

# Copy the postgres driver to its required location
RUN ["cp", "/usr/share/java/postgresql-jdbc.jar", "jars/"]

ENTRYPOINT ["./flyway"]

This allows you to run flyway inside of its own container. Example:

docker run --rm -v '/opt/migrations:/opt/migrations' org.tobereplaced/flyway migrate -user=postgres -url='jdbc:postgresql://172.17.0.5:5432/exampledb' -locations='filesystem:/opt/migrations'

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:11
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

17reactions
dhoercommented, Oct 4, 2016

@axelfontaine any chance we can get an official flyway repo in 2016?

2reactions
axelfontainecommented, Dec 4, 2017

This is now available: https://hub.docker.com/r/boxfuse/flyway/

Thanks @dhoer for providing a nice starting point with your repo!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Official Flyway Docker images - GitHub
Official Flyway Community Docker images ... This is the official repository for Flyway Command-line images. The Flyway Community images are available in flyway/ ......
Read more >
Official Flyway Community Docker images
Official Flyway Community Docker images. Docker Auto Build. This is the official repository for Flyway Command-line images. For Teams and Enterprise images, ...
Read more >
A Flyway Migration Using Docker - Redgate Software
A Flyway Migration Using Docker. A lot of work with Flyway is going to take place on development machines with the Flyway command...
Read more >
flyway-docker - Iron Bank Containers
flyway -docker is the official repository for Flyway Command-line images. The Flyway command-line tool is a standalone Flyway distribution.
Read more >
Implementing Flyway with Docker - Alana Thomas - Medium
You can implement Flyway in a Docker-based application by adding it as a service in the docker-compose.yml and configuring the correct environment variables ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found