Skip to content

Commit

Permalink
feat: Listing versions with <command>:?
Browse files Browse the repository at this point in the history
  • Loading branch information
boukeversteegh committed Mar 23, 2022
1 parent 6e210ef commit 85653d8
Show file tree
Hide file tree
Showing 4 changed files with 437 additions and 82 deletions.
34 changes: 21 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,27 @@ dockerized npm install # install packages.json

## Switching command versions

**Ad-hoc**

Add `:<version>` to the end of the command to override the version.

```shell
dockerized node:15
```


**Listing versions**

To see which versions are available, run:

```shell
dockerized node:?
# or
dockerized node:
```

**Environment Variables**

Each command has a `<COMMAND>_VERSION` environment variable which you can override.

- `python`: `PYTHON_VERSION`
Expand Down Expand Up @@ -188,13 +209,6 @@ This allows you to "lock" your tools to specific versions for your project.
- Create a `dockerized.env` file in your project directory.
- All commands executed within this directory will use the settings specified in this file.

**Ad-hoc**

Add `:<version>` to the end of the command to override the version.

```shell
dockerized node:15
```

**Ad-hoc (Unix)**

Expand All @@ -213,12 +227,6 @@ dockerized node:15
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.
## Localhost

Dockerized applications run within an isolated network. To access services running on your machine, you need to use `host.docker.internal` instead of `localhost`.
Expand Down
12 changes: 7 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ replace (
require (
github.com/compose-spec/compose-go v1.1.0
github.com/docker/cli v20.10.12+incompatible
github.com/docker/distribution v2.8.1+incompatible
github.com/docker/hub-tool v0.4.4
github.com/fatih/color v1.13.0
github.com/hashicorp/go-version v1.3.0
github.com/joho/godotenv v1.3.0
)

Expand All @@ -33,16 +37,14 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/distribution/distribution/v3 v3.0.0-20210316161203-a01c71e2477e // indirect
github.com/docker/buildx v0.7.1 // indirect
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/docker/docker v20.10.7+incompatible // indirect
github.com/docker/docker-credential-helpers v0.6.4 // indirect
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-metrics v0.0.1 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/felixge/httpsnoop v1.0.2 // indirect
github.com/fvbommel/sortorder v1.0.1 // indirect
github.com/fvbommel/sortorder v1.0.2 // indirect
github.com/go-logr/logr v1.2.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gofrs/flock v0.8.0 // indirect
Expand All @@ -53,12 +55,12 @@ require (
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.2.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-version v1.3.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
Expand All @@ -68,7 +70,7 @@ require (
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-shellwords v1.0.12 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/miekg/pkcs11 v1.0.3 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/moby/buildkit v0.9.1-0.20211019185819-8778943ac3da // indirect
Expand Down
Loading

0 comments on commit 85653d8

Please sign in to comment.