mirror of
https://github.com/fradelg/docker-mysql-cron-backup.git
synced 2025-06-23 07:09:07 +00:00
build dockerize and fix restore.sh db name for issue #38
This commit is contained in:
parent
150f905567
commit
2405077482
3 changed files with 31 additions and 13 deletions
20
Dockerfile
20
Dockerfile
|
@ -1,15 +1,21 @@
|
|||
FROM golang:1.15.8-alpine3.12 AS binary
|
||||
RUN apk -U add openssl git
|
||||
|
||||
ARG DOCKERIZE_VERSION=v0.6.1
|
||||
WORKDIR /go/src/github.com/jwilder
|
||||
RUN git clone https://github.com/jwilder/dockerize.git && cd dockerize && git checkout ${DOCKERIZE_VERSION}
|
||||
|
||||
WORKDIR /go/src/github.com/jwilder/dockerize
|
||||
RUN go get github.com/robfig/glock
|
||||
RUN glock sync -n < GLOCKFILE
|
||||
RUN go install
|
||||
|
||||
FROM alpine:3.12
|
||||
LABEL maintainer "Fco. Javier Delgado del Hoyo <frandelhoyo@gmail.com>"
|
||||
|
||||
RUN apk add --update tzdata bash mysql-client gzip openssl mariadb-connector-c && rm -rf /var/cache/apk/*
|
||||
|
||||
ARG OS=alpine-linux
|
||||
ARG ARCH=amd64
|
||||
ARG DOCKERIZE_VERSION=v0.6.1
|
||||
|
||||
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-$OS-$ARCH-$DOCKERIZE_VERSION.tar.gz \
|
||||
&& tar -C /usr/local/bin -xzvf dockerize-$OS-$ARCH-$DOCKERIZE_VERSION.tar.gz \
|
||||
&& rm dockerize-$OS-$ARCH-$DOCKERIZE_VERSION.tar.gz
|
||||
COPY --from=binary /go/bin/dockerize /usr/local/bin
|
||||
|
||||
ENV CRON_TIME="0 3 * * sun" \
|
||||
MYSQL_HOST="mysql" \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue