diff --git a/Makefile b/Makefile index 65597e4..bcbf7d4 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ generate: packr2 HAS_PACKR2 := $(shell command -v packr2) packr2: ifndef HAS_PACKR2 - $(GO) get -u github.com/gobuffalo/packr/v2/packr2 + cd /tmp && $(GO) get github.com/gobuffalo/packr/v2/packr2@v2.6.0 endif xbuild-all: generate @@ -90,4 +90,4 @@ clean: clean-packr -rm -fr bin/ clean-packr: packr2 - cd pkg/docker && packr2 clean \ No newline at end of file + cd pkg/docker && packr2 clean diff --git a/README.md b/README.md index f133be2..e03ca56 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # A Docker Mixin for Porter -This is a Docker mixin for Porter. The mixin provides the Docker CLI. +This is a Docker mixin for Porter. The mixin provides the Docker CLI. [![Build Status](https://dev.azure.com/getporter/porter/_apis/build/status/docker-mixin?branchName=main)](https://dev.azure.com/getporter/porter/_build/latest?definitionId=12&branchName=main) @@ -17,13 +17,13 @@ mixins: ## Mixin Configuration -The Docker client version can be specified via the `clientVersion` configuration when declaring this mixin. The default client version is currently set to 19.03.8. +The Docker client version can be specified via the `clientVersion` configuration when declaring this mixin. The default client version is currently set to 20.10.7. ```yaml - docker: - clientVersion: 19.03.8 + clientVersion: 20.10.7 ``` ## Mixin Commands -The commands available are docker pull, push, build, run, remove, and login. +The commands available are docker pull, push, build, run, remove, and login. ## Mixin Syntax & Examples The same syntax applies for install, upgrade, and uninstall. @@ -123,7 +123,7 @@ You can specify either the tag or the digest. description: "Description of the command" run: image: IMAGE - name: NAME + name: NAME detach: BOOL #defaults to false ports: - host: NUMBER # porter exposed on the host @@ -196,12 +196,11 @@ You can specify either the tag or the digest. #### Syntax Username and password are optional because the mixin will default to using environment variables provided by DOCKER_USERNAME and DOCKER_PASSWORD from a parameter or a credential. -See an [example](/examples/docker-mixin-test/README.md#notes-on-docker-login) for how to use -docker login and securely provide your username and password. +See an [example](/examples/docker-mixin-test/README.md#notes-on-docker-login) for how to use docker login and securely provide your username and password. ```yaml - docker: description: "Description of the command" - login: + login: username: USERNAME #OPTIONAL password: PASSWORD #OPTIONAL arguments: diff --git a/examples/docker-mixin-test/porter.yaml b/examples/docker-mixin-test/porter.yaml index 022b454..a54cb14 100644 --- a/examples/docker-mixin-test/porter.yaml +++ b/examples/docker-mixin-test/porter.yaml @@ -14,7 +14,7 @@ credentials: mixins: - docker: - clientVersion: 19.03.12 + clientVersion: 20.10.7 install: - docker: diff --git a/pkg/docker/build.go b/pkg/docker/build.go index 6678c9a..3d2e1bb 100644 --- a/pkg/docker/build.go +++ b/pkg/docker/build.go @@ -26,7 +26,7 @@ type BuildInput struct { // MixinConfig represents configuration that can be set on the docker mixin in porter.yaml // mixins: // - docker: -// clientVersion: 19.03.8 +// clientVersion: 20.10.7 type MixinConfig struct { ClientVersion string `yaml:"clientVersion,omitempty"` } diff --git a/pkg/docker/build_test.go b/pkg/docker/build_test.go index ece4e2c..302a7b4 100644 --- a/pkg/docker/build_test.go +++ b/pkg/docker/build_test.go @@ -16,7 +16,7 @@ func TestMixin_Build(t *testing.T) { err := m.Build() require.NoError(t, err) - wantOutput := fmt.Sprintf(dockerfileLines, "19.03.8") + wantOutput := fmt.Sprintf(dockerfileLines, "20.10.7") gotOutput := m.TestContext.GetOutput() assert.Equal(t, wantOutput, gotOutput) diff --git a/pkg/docker/mixin.go b/pkg/docker/mixin.go index 1e0c76d..bd76fe4 100644 --- a/pkg/docker/mixin.go +++ b/pkg/docker/mixin.go @@ -12,7 +12,7 @@ import ( "github.com/pkg/errors" ) -const defaultDockerVersion = "19.03.8" +const defaultDockerVersion = "20.10.7" type Mixin struct { *context.Context diff --git a/pkg/docker/testdata/build-input-with-version.yaml b/pkg/docker/testdata/build-input-with-version.yaml index c4cb389..b4b2e65 100644 --- a/pkg/docker/testdata/build-input-with-version.yaml +++ b/pkg/docker/testdata/build-input-with-version.yaml @@ -1,2 +1,2 @@ config: - clientVersion: 19.03.12 \ No newline at end of file + clientVersion: 19.03.12