Also useful to have a docker-compose.override.yml. It will automatically merge that with your default docker-compose.yml unless you use the -f flag. Very useful for dev-only config (e.g. volumes to aid in development and maybe different port mappings or debug flags, etc).
I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
I don't think docker-compose up is a lot to type, given the frequency with which you're likely to use it and the fact that it'll be in your command history a simple <ctrl-r> away if you're feeling that lazy anyway.
I'm a fan of not making aliases which shadow other commands, too - there's a good chance you have a dc on your system already, even if you don't use it.
It's not just for up, but for any docker-compose command, of which, I use many many times (I do a ton of Docker development). docker-compose is a weird one for me to type, too, and I always feel like I really stutter over it.
I'm Jake Cahill: Lifetime Pythonista, web scraping, cloud computing, and automation expert. Enjoy books. Love my wife, dog, and cat, and think AI and Rust are pretty nifty
Location
Massachusetts, USA
Education
A Master's patient mentorship and insatiable curiosity
The command docker-compose always comes out docker-compsoe the first time. Try as I might, I can never type it correctly on the first go. I don't use aliases in my shell because I like to remember the commands I'm typing and the flags I use. I feel like it forces me to think through command layout, what flags actually do and helps me remember. But I totally get the frustration of what I like to call "keyboard dyslexia". And the word compose is such that I almost always type it incorrectly the first time.
I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
I probably type doc<tab>-c<tab> in reality. It's hard for me to test since if I just open a terminal I'll be conscious of what I'm doing, but I tab complete a lot.
First off, don't just
docker-compose upcuz that's a lot to type out. Try an alias ofdctodocker-compose.Then you can add
-d:dc up -dI almost always have a production
dcoker-compose.production.ymland I will aliasdcptodocker-compose -f docker-compose.yml -f docker-compose.production.ymlAlso useful to have a
docker-compose.override.yml. It will automatically merge that with your defaultdocker-compose.ymlunless you use the-fflag. Very useful for dev-only config (e.g. volumes to aid in development and maybe different port mappings or debug flags, etc).I don't think
docker-compose upis a lot to type, given the frequency with which you're likely to use it and the fact that it'll be in your command history a simple<ctrl-r>away if you're feeling that lazy anyway.I'm a fan of not making aliases which shadow other commands, too - there's a good chance you have a
dcon your system already, even if you don't use it.It's not just for
up, but for anydocker-composecommand, of which, I use many many times (I do a ton of Docker development).docker-composeis a weird one for me to type, too, and I always feel like I really stutter over it.But to each their own!
The command
docker-composealways comes outdocker-compsoethe first time. Try as I might, I can never type it correctly on the first go. I don't use aliases in my shell because I like to remember the commands I'm typing and the flags I use. I feel like it forces me to think through command layout, what flags actually do and helps me remember. But I totally get the frustration of what I like to call "keyboard dyslexia". And the word compose is such that I almost always type it incorrectly the first time.I probably type
doc<tab>-c<tab>in reality. It's hard for me to test since if I just open a terminal I'll be conscious of what I'm doing, but I tab complete a lot.Whoa, didn't know that about "override"!