-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
made AWS credentials optional #1
base: master
Are you sure you want to change the base?
Conversation
@@ -1,6 +1,6 @@ | |||
FROM ubuntu:18.04 | |||
|
|||
RUN apt-get update && apt-get install -y --no-install-recommends curl cron awscli | |||
RUN apt-get update && apt-get install -y --no-install-recommends curl cron awscli less vim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need less
and vim
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it was for debugging. Should probably be removed
@@ -8,7 +8,7 @@ cat <<EOF > env.sh | |||
BACKUP_SOURCES="${BACKUP_SOURCES:-/backup}" | |||
BACKUP_CRON_EXPRESSION="${BACKUP_CRON_EXPRESSION:-@daily}" | |||
AWS_S3_BUCKET_NAME="${AWS_S3_BUCKET_NAME:-}" | |||
BACKUP_FILENAME="$(date +"${BACKUP_FILENAME:-backup-%Y-%m-%dT%H-%M-%S.tar.gz}")" | |||
BACKUP_FILENAME="\$(date +"${BACKUP_FILENAME:-backup-%Y-%m-%dT%H-%M-%S.tar.gz}")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look intentional, either?
if [ ! -z "$AWS_ACCESS_KEY_ID" ]; then | ||
cat <<EOF > .aws/credentials | ||
[default] | ||
aws_access_key_id = ${AWS_ACCESS_KEY_ID} | ||
aws_secret_access_key = ${AWS_SECRET_ACCESS_KEY} | ||
EOF | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing some indentation..?
will this be merged some time in the future, identation cannot be a big issue. |
Other problems like installing extra packages and adding incorrect escaping probably is, though. |
Add host check
In case your docker host is a EC2 instance itself, the S3 access can be granted via IAM instance role. But this only works if AWS credentials are not passed directly to the CLI.