Dock Life: Using Docker for All The Things!

Interesting take by the folks at nystudio107: instead of installing things such as node locally, why not run it in a container with an alias linked to it? Instead of installing all of the tools & pack­ages you’re used to using, we use Dock­er images that some­one else has cre­at­ed that con­tain these tools & …


This content originally appeared on Bram.us and was authored by Bramus!

Interesting take by the folks at nystudio107: instead of installing things such as node locally, why not run it in a container with an alias linked to it?

Instead of installing all of the tools & pack­ages you’re used to using, we use Dock­er images that some­one else has cre­at­ed that con­tain these tools & packages.

In order to seam­less­ly pro­vide access to var­i­ous tools run via Dock­er, we’re going to use shell aliases.

For example, to have node available, set up this alias:

alias node='docker run --rm -it -v `pwd`:/app -w /app node:16-alpine '

With that set up, you can run node install as you’d normally do.

Same can be done for other node versions, npm, composer, deno, …

Dock Life: Using Docker for All The Things! →


This content originally appeared on Bram.us and was authored by Bramus!


Print Share Comment Cite Upload Translate Updates
APA

Bramus! | Sciencx (2021-11-29T22:13:03+00:00) Dock Life: Using Docker for All The Things!. Retrieved from https://www.scien.cx/2021/11/29/dock-life-using-docker-for-all-the-things/

MLA
" » Dock Life: Using Docker for All The Things!." Bramus! | Sciencx - Monday November 29, 2021, https://www.scien.cx/2021/11/29/dock-life-using-docker-for-all-the-things/
HARVARD
Bramus! | Sciencx Monday November 29, 2021 » Dock Life: Using Docker for All The Things!., viewed ,<https://www.scien.cx/2021/11/29/dock-life-using-docker-for-all-the-things/>
VANCOUVER
Bramus! | Sciencx - » Dock Life: Using Docker for All The Things!. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/11/29/dock-life-using-docker-for-all-the-things/
CHICAGO
" » Dock Life: Using Docker for All The Things!." Bramus! | Sciencx - Accessed . https://www.scien.cx/2021/11/29/dock-life-using-docker-for-all-the-things/
IEEE
" » Dock Life: Using Docker for All The Things!." Bramus! | Sciencx [Online]. Available: https://www.scien.cx/2021/11/29/dock-life-using-docker-for-all-the-things/. [Accessed: ]
rf:citation
» Dock Life: Using Docker for All The Things! | Bramus! | Sciencx | https://www.scien.cx/2021/11/29/dock-life-using-docker-for-all-the-things/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.