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.

56 lines
2.0 KiB

  1. FROM alpine:3.13
  2. LABEL maintainer="Dzango Technologies Limited <info@dzangolab.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. postgresql \
  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. ADD run.sh run.sh
  35. ADD backup.sh backup.sh
  36. ENV POSTGRES_DATABASES **None**
  37. ENV POSTGRES_EXTRA_OPTS ''
  38. ENV POSTGRES_HOST **None**
  39. ENV POSTGRES_PASSWORD **None**
  40. ENV POSTGRES_PORT 5432
  41. ENV POSTGRES_USER **None**
  42. ENV S3_ACCESS_KEY_ID **None**
  43. ENV S3_BUCKET **None**
  44. ENV S3_ENDPOINT **None**
  45. ENV S3_FILENAME **None**
  46. ENV S3_PREFIX 'backup'
  47. ENV S3_REGION us-west-1
  48. ENV S3_S3V4 no
  49. ENV S3_SECRET_ACCESS_KEY **None**
  50. ENV SCHEDULE **None**
  51. CMD ["sh", "run.sh"]