mirror of
https://github.com/TECHNOFAB11/dbmate.git
synced 2025-12-11 23:50:04 +01:00
Add sql clients to docker image (#157)
Instead of a nice super-minimal production docker image, create one based on alpine with sql clients installed (`mariadb-client`, `postgresql-client`, and `sqlite`). * Increases docker image size from 10 MB to 56 MB 👎 * Allows people to run `dbmate dump` command with our docker image (fixes #114) 👍 * I'm not sure what compatibility is like between `mysqldump` from `mariadb-client` versus `mysql-client`, but starting here since mariadb is included with alpine, and the version I built using mysql and ubuntu weighed in at 165 MB. 🤔
This commit is contained in:
parent
4581acafad
commit
4387633e1f
1 changed files with 7 additions and 3 deletions
10
Dockerfile
10
Dockerfile
|
|
@ -32,6 +32,10 @@ ENTRYPOINT []
|
|||
CMD ["/bin/bash"]
|
||||
|
||||
# runtime image
|
||||
FROM scratch
|
||||
COPY --from=build /src/dist/dbmate-linux-amd64 /dbmate
|
||||
ENTRYPOINT ["/dbmate"]
|
||||
FROM alpine
|
||||
RUN apk add --no-cache \
|
||||
mariadb-client \
|
||||
postgresql-client \
|
||||
sqlite
|
||||
COPY --from=build /src/dist/dbmate-linux-amd64 /usr/local/bin/dbmate
|
||||
ENTRYPOINT ["dbmate"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue