Official Flyway Dockerfile
See original GitHub issueWould 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:
- Created 9 years ago
- Reactions:11
- Comments:10 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@axelfontaine any chance we can get an official flyway repo in 2016?
This is now available: https://hub.docker.com/r/boxfuse/flyway/
Thanks @dhoer for providing a nice starting point with your repo!