powerman / dockerize Goto Github PK
View Code? Open in Web Editor NEWUtility to simplify running applications in docker containers
License: MIT License
Utility to simplify running applications in docker containers
License: MIT License
Is it possible to let the http.Client honor HTTP_PROXY, HTTPS_PROXY and NO_PROXY from environment?
E.g. here
Line 128 in c9d5501
AFAIK its just add Proxy: http.ProxyFromEnvironment
to the transport config. But I'm not really familiar with Go.
Thx for your investigation.
Hi.
It looks like this GitHub project is progressing faster than jwilder/dockerize, so I opened a duplicate of jwilder/dockerize#158 here.
It looks like no-verifyhost
option I suggested is already implemented in this project as skip-tls-verify
option. At the same time I cannot find if ca-file
and verifyhost
options I suggested are implemented here, so I decided that it is still helpful suggestion of new feature.
Thank you for developing dockerize!
I am using dockerize (right now for the templating feature), and considering how to proceed with logs.
Using several -stdout options I can ship several logs to stdout, however the result in docker logs is interleaved from the several input files.
Would it be possible to optionally prefix each log line with a tag to distinguish which log cons from which file ?
would be great to implement support for hotreload ( if it is explicitily allowed via ENV variable for example ) application when template, configuration file is changed
reference: https://github.com/weaveworks/Watch
also notifications support would be deal to this feature ( send webhook after hotreload )
reference https://github.com/containrrr/shoutrrr
thanks
I had to detach this fork from original jwilder/dockerize because @jwilder refuse to collaborate and (so far) don't actually maintain his project himself.
Timeline for jwilder/dockerize project:
Below is body of my deleted issue About powerman/dockerize fork (sent to me by GitHub support):
(This is @powerman - I had to use different account because it looks like I can't create issues in this repo anymore.)
This is a jwilder/dockerize#120 followup. Not sure why, but I can't reply in old issue, GitHub says "You can't perform this action at this time.", and also sorry for delay with the response - I didn't received email from GitHub with jwilder/dockerize#120 (comment) and next comment, maybe this somehow related to mentioned above permission error. I can't even "watch" this repo now - any chance you've banned me?
In short, I'm not trying to hijack this tool and will be more than happy to provide and discuss several PRs with improvements already implemented in my fork (and finally close the fork - I've a lot of own open source projects to maintain and don't like to maintain one more if I can avoid this). Yeah, at some point I did large refactoring to make it easier to maintain the project, and merging it very likely will became an issue and may be rejected, but we can at least start with something less controversial. E.g. I've already opened about 4 months ago trivial PRs jwilder/dockerize#122 and jwilder/dockerize#123 - why don't you take a look and at least reply, if not merge? You have said project is still maintained, but I didn't see any your activity in last 10 month except mentioned above single comment.
The fork that has been created is quite different than this project.
How is this? Main and only real difference is massive refactoring. I neither plan nor done any critical changes to project behaviour, because I don't need this - only reason to fork was needs in having maintained project. Even if this happens somehow - it wasn't intentional and I'll be happy to discuss and fix such a changes.
It also has questionable contributor practices in that anyone can become a contributor if they ask.
Actually, this isn't a real problem. If you'll take a look at https://github.com/powerman/dockerize/blob/master/.github/CODEOWNERS you'll notice no one can merge to master without having me to review and accept changes first. My plan was to slowly add trusted contributors there if/when waiting for my review will became an issue. So, even with a lot of contributors there is no way to make malicious changes in code.
I am trying to install Dockerize macO Catalina Sbut I get the following error
stdin /usr/local/bin/dockerize
install: /dev/stdin: Inappropriate file type or format
Currently the checksum file does contain the checksum but instead of the artifact filename it contains a -
.
In order for the checksum file to work, it should reference the artifact filename. For instance, with gitea: https://github.com/go-gitea/gitea/releases/download/v1.12.0-rc1/gitea-1.12.0-rc1-darwin-10.6-386.sha256
would be great to support metrics in openmetrics format:
metrics:
dockerize_wait_status{container_id="<id>", wait_http_web1_80="ready", wait_http_web2_8080="retrying", wait_http_web3_8080="failed" X
dockerize_hotreloaded{container_id="<id>"} 1
thanks
Previous versions of dockerize have different assets for different platforms:
But the latest one just has the source code:
This causes the installation to fail when using latest
:
The dockerize executable is 0 bytes because the outer curl command fails. The outer curl command fails because because the inner curl/grep command cannot find the platform in the assets and so there is no URL returned, so curl throws an error saying you need to specify a url. This is from the docs:
curl -sfL $(curl -s https://api.github.com/repos/powerman/dockerize/releases/latest | grep -i /dockerize-$(uname -s)-$(uname -m)\" | cut -d\" -f4) | install /dev/stdin /usr/local/bin/dockerize
The assets just need to be added to the latest release
We're attempting to use dockerize in -template-strict
-mode to fail early when there is a mismatch between the configuration templates and the docker environment definition.
But now we're struggling with the use of optional environment variables: {{ if .Env.OPTIONAL_ENV }}
errors out as soon as OPTIONAL_ENV is undefined (as expected).
We tried {{ if hasKey .Env "OPTIONAL_ENV " }}
, but that doesn't appear to work (at <.Env>: wrong type for value; expected map[string]interface {}; got map[string]string
) as sprig's hasKey appears to only work on dicts and not on maps.
Our work-around is to drop -template-strict
again, but we'd really like to be strict by default and clearly mark the places where we accept undefined variables.
Are we doing something wrong (quite new to go & text/template)? Or is this simply something that is missing from the templating language?
with strip/ldflags and upx
go build -ldflags "-s -w" ./...
upx -v --ultra-brute --lzma
i got the filesize form 9.4M down to 2.0M
That's a remarkable tool, and thanks God for the MIT license.
Keep up the good work!
Can you explain how to use untilStep function?
I need a way to loop over a variable with multiple values
Like this...
TEST="val1 val2 val3"
{{ $i := loop .Env.TEST }}
foo = {{ $i }}
{{ end }}
Best regards
Heino
Hello,
first of all thank you all for your work. We are using dockerize
for the upcoming release of our examination server in an educational environment.
This issue is opened only because I have a question:
Is there a particular reason why the tag latest
on hub.docker.com points to another and two months older image then the last released version tag 0.16.0?
In other words:
Could you please shortly explain your release and tagging policy, especially regarding the latest
tag?
Yours sincerely
woicha [Thomas Walcher]
It looks like the exit code for fatal errors (like timeout when waiting for something) is hard-coded and is 123. Refer to main.go:26.
In some cases users of Dockerize may need different exit code to avoid possible conflict with application exit code.
In some cases users of Dockerize may need different exit code when wait fails, e.g. if Dockerize is used in a Docker health check (without shell, because in some images - like Distroless - shell can be missing), then exit code of health check has to meet following requirements:
The command’s exit status indicates the health status of the container. The possible values are:
- 0: success - the container is healthy and ready for use
- 1: unhealthy - the container is not working correctly
- 2: reserved - do not use this exit code
While it looks like even 123 exit code works with Docker (tested with mabrarov/docker-compose-init-container on CentOS 7 / Docker 1.12.x-1.13.x), it would be nice if users of Dockerize can follow requirements of Docker health check when using Dockerize with exec array format of Dockerfile HEALHTCHECK
instruction.
Thank you for investment into enhancement of Dockerize!
This should let us run command as PID1 and/or avoid subtle issues related to signal forwarding, running command under supervision, etc.
In case dockerize needs to both run given command and tail logs it'll have to run tail in child process and configure it to exit when it parent process (command) will exit.
Can you provide a sha256 file and an asc file for each binary in the releases section ?
It will give the possibility to enforce stronger download checks.
Thanks.
As stated in issue #43
The current checksum does not work with automated systems.
Let's get ansible for instance. I use this module https://docs.ansible.com/ansible/latest/modules/get_url_module.html to download binaries.
In order for the checksum parameter to work, the checksum file needs to have the complete binary name.
Generally, a binary is renamed after its checksum is verified as it would make no sense to execute any operation on a binary with a failing checksum (imagine that the binary is a malware that can benefit from a cp
or mv
fault).
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.