vladgh / docker_base_images Goto Github PK
View Code? Open in Web Editor NEWVlad's Base Images for Docker
License: Apache License 2.0
Vlad's Base Images for Docker
License: Apache License 2.0
The healthcheck for the puppetserver image uses puppet
to get the certificate paths. This adds an unnecessary burden to the CPU for every interval.
A simple hostname interpolation would be much better (ex: --cert "/etc/puppetlabs/puppet/ssl/certs/$(hostname).pem"), which should work just as well, but keep the load to a minimum.
Use binary by default.
Your main:
main(){
if [[ ! "$S3PATH" =~ s3:// ]]; then
log 'No S3PATH specified' >&2; exit 1
fi
# Run initial sync
sync_files "$S3PATH" "$DESTINATION"
# Exit if argument is 'once'
if [[ "${*:-}" == 'once' ]]; then exit; fi
# Setup inotify or cron job
if [[ -n "$WATCHDIR" ]]; then
watch_directory
elif [[ -n "$CRON_TIME" ]]; then
run_cron
fi
}
Note that the initial sync is run even if WATCHDIR is specified. I would assume that the behavior would be that if a WATCHDIR is specified, only that directory is synced to S3. I'm assuming there should be no sync from S3 -> destination in this case.
Use SHA512 for hashing the password.
Hi @vladgh.
Your dockerized minidlna really great! Thank you for it.
Is it possible to add support for more formats for dlna server? Like example, avi is not exposed by server to clients. Maybe in scope of this, if some additional codecs are missing too it could be added to image.
Thanks
In the logs this looks like:
Completed 256.0 KiB/3.8 MiB (481.2 KiB/s) with 1 file(s) remaining#015Completed 512.0 KiB/3.8 MiB (869.8 KiB/s) with 1 file(s) remaining#015Completed 768.0 KiB/3.8 MiB (1.2 MiB/s) with 1 file(s) remaining #015Completed 1.0 MiB/3.8 MiB (1.5 MiB/s) with 1 file(s) remaining #015Completed 1.2 MiB/3.8 MiB (1.8 MiB/s) with 1 file(s) remaining #015Completed 1.5 MiB/3.8 MiB (2.1 MiB/s) with 1 file(s) remaining #015Completed 1.8 MiB/3.8 MiB (2.4 MiB/s) with 1 file(s) remaining #015Completed 2.0 MiB/3.8 MiB (2.6 MiB/s) with 1 file(s) remaining #015Completed 2.2 MiB/3.8 MiB (2.9 MiB/s) with 1 file(s) remaining #015Completed 2.5 MiB/3.8 MiB (3.1 MiB/s) with 1
Example
docker run --rm -i \
-e GPG_PASSPHRASE=myverystrongpassword \
-v /host/path/to/restore:/restore \
vladgh/backup restore < /path/to/host/restore_file.tar.xz.gpg
Useful for postrun hooks.
Backup script should avoid writing anything to disk, and use pipes instead (tar | gpg | s3).
Refactor entrypoint.sh for a cleaner logic.
Server time seems to be the best option: https://docs.puppet.com/puppetdb/4.4/api/meta/v1/server-time.html
Hey, I'm using your backup image and it works great but I'm having an issue restoring.
When I call the restore command I get the error:
fatal error: Parameter validation failed: Invalid bucket name "s3:": Bucket name must match the regex "^[a-zA-Z0-9.\-_]{1,255}$"
If I echo out the bucket name it's trying to use I get:
s3://s3://[my-bucket]/[prefix]/[prefix]/hourly/2017-06-28_03-00-04.tar.xz
so it seem the s3:// gets doubled and the [prefix] gets doubled as well in the url construction.
Changing linke 167 in entrypoint.sh from
aws s3 cp "s3://${AWS_S3_PATH}/${RESTORE_FILE}" "$RESTORE_FILE"
to
aws s3 cp "s3://${AWS_S3_BUCKET}/${RESTORE_FILE}" "$RESTORE_FILE"
Seems to fix the path.
Retry command every 10 seconds until it succeeds.
When restoring a backup using a prefix this function causes the prefix to get doubled so the aws s3 cp command fails.
get_archive(){
if [[ -s $_restore_file ]]; then
return
else
# Download the latest archive from S3
set_up_s3
_restore_file="$(get_latest_s3_archive)"
if [[ -n "$_restore_file" ]]; then
aws s3 cp "${_aws_s3_path}/${_restore_file}" "$_restore_file"
fi
fi
}
With a prefix of "myprefix" the script attempts to copy the backup from: "myprefix/myprefix/hourly..."
The issue is that aws_s3_path
has the prefix at the end, and restore_file
has the prefix at the start.
For example GPG_RECIPIENT and GPG_KEY_URL will only work for the first time, not in subsequent cron jobs.
Docker 17.06 allows specifying a secret location within the container
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.