datastack-net / dockerized
- вторник, 15 марта 2022 г. в 00:32:00
Run popular commandline tools within docker
Run popular commandline tools without installing them.
dockerized <command>
If your favorite command is not included, it can be added very easily. See Add a command.
Dockerized will also fall back to over 150 commands defined in jessfraz/dockerfiles.
git clone https://github.com/datastack-net/dockerized.git
dockerized/bin
directory to your PATH
:
export PATH="$PATH:$HOME/dockerized/bin"
See: How to add a folder to
PATH
environment variable in Windows 10
Run any supported command, but within Docker.
dockerized <command>
Examples:
dockerized node --version # v16.13.0
dockerized vue create new-project # create a project with vue cli
dockerized tsc --init # initialize typescript for the current directory
dockerized npm install # install packages.json
Each command has a <COMMAND>_VERSION
environment variable which you can override.
python
: PYTHON_VERSION
node
: NODE_VERSION
tsc
: TSC_VERSION
Notes:
npm
, you should override NODE_VERSION
.Global
Create a dockerized.env
file in your home directory for global configuration.
# dockerized.env (example)
NODE_VERSION=16.13.0
PYTHON_VERSION=3.8.5
TYPESCRIPT_VERSION=4.6.2
List of configuration variables, and defaults:
Per directory
You can also specify version and other settings per directory. This allows you to "lock" your tools to specific versions for your project.
dockerized.env
file in your project directory.Ad-hoc (Unix)
Override the environment variable before the command, to specify the version for that command.
NODE_VERSION=15.0.0 dockerized node
Ad-hoc (Windows Command Prompt)
Set the environment variable in the current session, before the command.
set NODE_VERSION=15.0.0
dockerized node
Ad-hoc (Windows Powershell)
It's currently not known how to specify the version of a command in a Powershell script through environment variables.
As an alternative, you can create a dockerized.env
file in the current directory.
dockerized tree ../dir
will not work)
cd .. && dockerized tree dir
)dockerized
.