Comments (13)
from dockerize.
i understand now that i was missing the app to be executed after the template finished processing.
the help line is a little misleading:
$ dockerize -h
Usage of dockerize:
-delims string
template tag delimiters. default "{{":"}}"
-stderr value
Tails a file to stderr. Can be passed multiple times
-stdout value
Tails a file to stdout. Can be passed multiple times
-template value
Template (/template:/dest). Can be passed multiple times
-version
show version
- i'm missing an "how to execute" line at the top of the help file
- also, i'd like to have a way to just generate a template without executing anything
from dockerize.
Right now I'm bypassing this by passing true
to the app part of the command, practically making dockerize execute a no-op:
$ docker -template x:y true && my_app
# instead of doing this, which is undesirable in my case:
$ docker -template x:y my_app
However, this is a hack. This is sometimes necessary because letting dockerize execute the app can sometimes create problems and errors. For example when SIGTERM
ing.
It feels like dockerize is trying to achieve two things at once, instead of going the unix way: Splitting the features into two separate tools, which can be bundled together if necessary. wdyt?
from dockerize.
@oryband I think some kind of a -dry-run
feature would be useful. Good idea.
from dockerize.
The no command specified
could be improved as well.
from dockerize.
I know it's not backward compatible, but I would prefer that dockerize
's default behaviour would be to not expect a command be given (i.e. default -dry-run
) so it just renders the template. If you want to give a command, you would have to specify --command="XXX XXX"
from dockerize.
@oryband I've updated the usage as well as made command optional as well.
@doodyparizada Command is not optional. You can render templates to standard output for debugging by leaving off the :/dest
portion.
from dockerize.
@jwilder thanks!
however, I think adding an example of the hack I did above is a good idea (providing true
as a command). Some people (like myself) would only like to use the templating feature of dockerize, without the execution part. If we're keeping the command as required, we should at least provide an example how to bypass it.
from dockerize.
@oryband It sounds like you may be better off using jwilder/docker-gen
instead of dockerize
.
from dockerize.
@md5 I did at first, but it requires mounting the docker socket file in order to fetch environment variables. This is kinda overkill for the purpose of templating.
There is no other golang cli template tool available beside these two tools.
from dockerize.
@md5 You're right. That was a silly suggestion on my part.
from dockerize.
@md5 why are you talking to yourself? :)
from dockerize.
Why not achieve maximum silliness?
from dockerize.
Related Issues (20)
- Self signed certificate support? HOT 2
- will there be new release as in 0.6.2? HOT 2
- Can we just use the templating but not run anything? HOT 1
- Invalid value "20s\r" for flag -timeout
- Template function to read contents of file and (optionally) stripping last newline?
- Multi-arch support specially arm64 HOT 2
- Add checksum file to release
- Dockerise uid:gid
- request a new release HOT 2
- request a new release for arm64 HOT 1
- Update the gomod libraries to address security vulnerabilities
- `go install` fails with latest version
- Bug: unable to tail /var/log/nginx/access.log: tomb: still alive HOT 3
- GO lang vulnerabilities HOT 2
- Unable to `go install` with `v0.7.0` & `latest` revisions HOT 1
- dockerhub tag for 0.7? HOT 3
- Alpine arm support HOT 3
- Golang vulnerability HOT 1
- Can we upgrade GO library to 121.1-r0 to remediate vulnerabilities HOT 2
- Can you please give an example of using this tool with postgresql in a docker container? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dockerize.