Skip to content

Commit

Permalink
Inherit Docker image from bandsintown/alpine and remove entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Huray committed Oct 22, 2016
1 parent c8768ee commit d9bd49d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
# Flyway image with MySQL Driver
#

FROM openjdk:8-jre-alpine

RUN apk --no-cache add openssl
FROM bandsintown/alpine:3.4

WORKDIR /flyway

ENV FLYWAY_VERSION=4.0.3 MYSQL_DRIVER_VERSION=5.1.40 DOCKERIZE_VERSION=v0.2.0

RUN wget https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/${FLYWAY_VERSION}/flyway-commandline-${FLYWAY_VERSION}.tar.gz \
RUN apk-install openjdk8-jre \
&& wget https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/${FLYWAY_VERSION}/flyway-commandline-${FLYWAY_VERSION}.tar.gz \
&& tar -xzf flyway-commandline-${FLYWAY_VERSION}.tar.gz \
&& mv flyway-${FLYWAY_VERSION}/* . \
&& rm flyway-commandline-${FLYWAY_VERSION}.tar.gz \
Expand All @@ -21,5 +20,4 @@ RUN wget https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/${FLYWAY
&& wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz

ENTRYPOINT ["flyway"]
CMD ["--help"]
CMD ["flyway", "--help"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Assuming your DB is a MySQL Database, running a schema migration is simple as th

```
docker run -v ${PWD}:/flyway/sql -it --rm bandsintown/flyway:4.0.3 \
-url=jdbc:mysql://db -schemas=db_schema -user=db_user -password=db_password migrate
flyway -url=jdbc:mysql://db -schemas=db_schema -user=db_user -password=db_password migrate
```

## Waiting for the DB
Expand Down

0 comments on commit d9bd49d

Please sign in to comment.