Browse Source

Added aws-cli

pull/119/head
Rob Harrison 7 years ago
parent
commit
fde51c7354
  1. 23
      aws-cli/Dockerfile
  2. 1
      aws-cli/bar.txt
  3. 11
      aws-cli/run.sh

23
aws-cli/Dockerfile

@ -0,0 +1,23 @@
FROM alpine:3.6
# Versions: https://pypi.python.org/pypi/awscli#downloads
ENV AWS_CLI_VERSION 1.15.47
ENV SCHEDULE **None**
RUN apk --no-cache update && \
apk --no-cache add python py-pip py-setuptools ca-certificates groff less && \
pip --no-cache-dir install awscli==${AWS_CLI_VERSION} && \
rm -rf /var/cache/apk/*
# install go-cron
RUN apk add --no-cache curl && \
curl -L --insecure https://github.com/odise/go-cron/releases/download/v0.0.6/go-cron-linux.gz | zcat > /usr/local/bin/go-cron && \
chmod u+x /usr/local/bin/go-cron && apk del curl
ADD run.sh /opt/s3cmd/run.sh
RUN chmod a+x /opt/s3cmd/run.sh
ENTRYPOINT ["/opt/s3cmd/run.sh"]
WORKDIR /data

1
aws-cli/bar.txt

@ -0,0 +1 @@
foo1

11
aws-cli/run.sh

@ -0,0 +1,11 @@
#! /bin/sh
set -e
echo "Running s3cmd ..."
if [ "${SCHEDULE}" = "**None**" ]; then
aws "$@"
else
exec go-cron "$SCHEDULE" aws "$@"
fi
Loading…
Cancel
Save