You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.1 KiB

10 years ago
10 years ago
10 years ago
10 years ago
  1. FROM alpine:3.13
  2. LABEL maintainer="Johannes Schickling <schickling.j@gmail.com>"
  3. ENV GLIBC_VER=2.33-r0
  4. # install glibc compatibility for alpine
  5. RUN apk --no-cache add \
  6. binutils \
  7. curl \
  8. && curl -sL https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \
  9. && curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VER}/glibc-${GLIBC_VER}.apk \
  10. && curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk \
  11. && curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VER}/glibc-i18n-${GLIBC_VER}.apk \
  12. && apk add --no-cache \
  13. glibc-${GLIBC_VER}.apk \
  14. glibc-bin-${GLIBC_VER}.apk \
  15. glibc-i18n-${GLIBC_VER}.apk \
  16. mysql-client \
  17. && /usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 \
  18. && curl -sL https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip \
  19. && unzip awscliv2.zip \
  20. && aws/install \
  21. && rm -rf \
  22. awscliv2.zip \
  23. aws \
  24. /usr/local/aws-cli/v2/*/dist/aws_completer \
  25. /usr/local/aws-cli/v2/*/dist/awscli/data/ac.index \
  26. /usr/local/aws-cli/v2/*/dist/awscli/examples \
  27. glibc-*.apk \
  28. && curl -L --insecure https://github.com/odise/go-cron/releases/download/v0.0.6/go-cron-linux.gz | zcat > /usr/local/bin/go-cron \
  29. && chmod u+x /usr/local/bin/go-cron \
  30. && apk --no-cache del \
  31. binutils \
  32. curl \
  33. && rm -rf /var/cache/apk/*
  34. ENV MYSQLDUMP_OPTIONS --quote-names --quick --add-drop-table --add-locks --allow-keywords --disable-keys --extended-insert --single-transaction --create-options --comments --net_buffer_length=16384
  35. ENV MYSQLDUMP_DATABASE --all-databases
  36. ENV MYSQL_HOST **None**
  37. ENV MYSQL_PORT 3306
  38. ENV MYSQL_USER **None**
  39. ENV MYSQL_PASSWORD **None**
  40. ENV S3_ACCESS_KEY_ID **None**
  41. ENV S3_SECRET_ACCESS_KEY **None**
  42. ENV S3_BUCKET **None**
  43. ENV S3_REGION us-west-1
  44. ENV S3_ENDPOINT **None**
  45. ENV S3_S3V4 no
  46. ENV S3_PREFIX 'backup'
  47. ENV S3_FILENAME **None**
  48. ENV MULTI_FILES no
  49. ENV SCHEDULE **None**
  50. ADD run.sh run.sh
  51. ADD backup.sh backup.sh
  52. CMD ["sh", "run.sh"]