diff --git a/Dockerfile b/Dockerfile index c30a84e..5f0e63d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,10 @@ -FROM alpine:3.12 +FROM alpine:3.13 LABEL maintainer="Fedor Borshev " -ADD install.sh install.sh -RUN sh install.sh && rm install.sh +RUN apk update \ + && apk --no-cache add dumb-init postgresql-client curl aws-cli + +RUN curl -L https://github.com/odise/go-cron/releases/download/v0.0.7/go-cron-linux.gz | zcat > /usr/local/bin/go-cron && chmod +x /usr/local/bin/go-cron ENV POSTGRES_DATABASE **None** ENV POSTGRES_HOST **None** @@ -19,8 +21,8 @@ ENV S3_ENDPOINT **None** ENV S3_S3V4 no ENV SCHEDULE **None** -ADD run.sh run.sh -ADD backup.sh backup.sh +ADD entrypoint.sh . +ADD backup.sh . ENTRYPOINT ["/usr/bin/dumb-init", "--"] -CMD ["sh", "run.sh"] +CMD ["sh", "entrypoint.sh"] diff --git a/run.sh b/entrypoint.sh similarity index 100% rename from run.sh rename to entrypoint.sh diff --git a/install.sh b/install.sh deleted file mode 100644 index 8ac8a7e..0000000 --- a/install.sh +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/sh - -# exit if a command fails -set -e - - -apk update - -# install pg_dump -apk --no-cache add postgresql-client - -# install dump-init -apk --no-cache add dumb-init - -# install s3 tools -apk --no-cache add aws-cli bash findutils groff less python3 tini inotify-tools - -# install go-cron -apk add curl -curl -L https://github.com/odise/go-cron/releases/download/v0.0.7/go-cron-linux.gz | zcat > /usr/local/bin/go-cron -chmod u+x /usr/local/bin/go-cron - - -# cleanup -rm -rf /var/cache/apk/*