Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit bcdf883

Browse files
committed
Docker app should only be used as a docker CLI plugin
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
1 parent 0942d5c commit bcdf883

6 files changed

Lines changed: 13 additions & 93 deletions

File tree

.fossa.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,3 @@ analyze:
1616
type: go
1717
target: github.com/docker/app/cmd/docker-app
1818
path: cmd/docker-app
19-
- name: github.com/docker/app/cmd/docker-app-standalone
20-
type: go
21-
target: github.com/docker/app/cmd/docker-app-standalone
22-
path: cmd/docker-app-standalone

Makefile

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,16 @@ check_go_env:
4141
@test $$(go list) = "$(PKG_NAME)" || \
4242
(echo "Invalid Go environment - The local directory structure must match: $(PKG_NAME)" && false)
4343

44-
cross: cross-plugin cross-standalone ## cross-compile binaries (linux, darwin, windows)
44+
cross: cross-plugin ## cross-compile binaries (linux, darwin, windows)
4545

4646
cross-plugin: bin/$(BIN_NAME)-linux bin/$(BIN_NAME)-darwin bin/$(BIN_NAME)-windows.exe
4747

48-
cross-standalone: bin/${BIN_STANDALONE_NAME}-linux bin/${BIN_STANDALONE_NAME}-darwin bin/${BIN_STANDALONE_NAME}-windows.exe
49-
5048
e2e-cross: bin/$(BIN_NAME)-e2e-linux bin/$(BIN_NAME)-e2e-darwin bin/$(BIN_NAME)-e2e-windows.exe
5149

5250
.PHONY: dynamic
5351
dynamic: STATIC_FLAGS :=
5452
dynamic: bin/$(BIN_NAME)
5553

56-
.PHONY: bin/${BIN_STANDALONE_NAME}-windows
57-
bin/${BIN_STANDALONE_NAME}-%.exe bin/${BIN_STANDALONE_NAME}-%: cmd/${BIN_STANDALONE_NAME} check_go_env
58-
GOOS=$* $(GO_BUILD) -o $@ ./$<
59-
60-
.PHONY: bin/${BIN_STANDALONE_NAME}
61-
bin/${BIN_STANDALONE_NAME}: cmd/${BIN_STANDALONE_NAME} check_go_env
62-
$(GO_BUILD) -o $@$(EXEC_EXT) ./$<
63-
6454
.PHONY: bin/$(BIN_NAME)-e2e-windows
6555
bin/$(BIN_NAME)-e2e-%.exe bin/$(BIN_NAME)-e2e-%: e2e bin/$(BIN_NAME)-%
6656
GOOS=$* $(GO_TEST) -c -o $@ ./e2e/

README.md

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -234,17 +234,18 @@ Removing network hello_default
234234

235235
## Installation
236236

237-
**Note**: This requires a pre-release version (19.03.0 beta 1 or later) of the
238-
[Docker CLI](https://download.docker.com).
237+
**Note**: Docker app is a _command line_ plugin (not be confused with docker _engine_ plugins), extending the `docker` command with `app` sub-commands.
238+
It requires [Docker CLI](https://download.docker.com) 19.03.0 or later with experimental features enabled.
239+
Either set environment variable `DOCKER_CLI_EXPERIMENTAL=enabled`
240+
or update your [docker CLI configuration](https://docs.docker.com/engine/reference/commandline/cli/#experimental-features).
241+
242+
**Note**: Docker-app can't be installed using the `docker plugin install` command (yet)
243+
239244

240245
Pre-built static binaries are available on
241246
[GitHub releases](https://github.com/docker/app/releases) for Windows, Linux and
242247
macOS. Each tarball contains two binaries:
243248
* `docker-app-plugin-{linux|darwin|windows.exe}` which is a [Docker CLI plugin](https://github.com/docker/cli/issues/1534). **Note**: This requires a pre-release version of the Docker CLI
244-
* `docker-app-standalone-{linux|darwin|windows.exe}` which is a standalone utility
245-
246-
To use the standalone version, use `docker-app` instead of `docker app` and all
247-
the examples will work the same way.
248249

249250
### Linux or macOS
250251

@@ -255,12 +256,7 @@ curl -fsSL --output "/tmp/docker-app-${OSTYPE}.tar.gz" "https://github.com/docke
255256
tar xf "/tmp/docker-app-${OSTYPE}.tar.gz" -C /tmp/
256257
```
257258

258-
To install as standalone:
259-
```console
260-
install -b "/tmp/docker-app-standalone-${OSTYPE}" /usr/local/bin/docker-app
261-
```
262-
263-
To install as a Docker CLI plugin:
259+
Install as a Docker CLI plugin:
264260
```console
265261
mkdir -p ~/.docker/cli-plugins && cp "/tmp/docker-app-plugin-${OSTYPE}" ~/.docker/cli-plugins/docker-app
266262
```
@@ -273,12 +269,7 @@ Invoke-WebRequest -Uri https://github.com/docker/app/releases/download/v0.8.0/do
273269
tar xf "docker-app.tar.gz"
274270
```
275271

276-
To install as standalone, copy it somewhere in your path:
277-
```powershell
278-
cp docker-app-standalone-windows.exe PATH/docker-app.exe
279-
```
280-
281-
To install as a Docker CLI plugin:
272+
Install as a Docker CLI plugin:
282273
```powershell
283274
New-Item -ItemType Directory -Path ~/.docker/cli-plugins -ErrorAction SilentlyContinue
284275
cp docker-app-plugin-windows.exe ~/.docker/cli-plugins/docker-app.exe

cmd/docker-app-standalone/main.go

Lines changed: 0 additions & 50 deletions
This file was deleted.

docker.Makefile

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,10 @@ cross: create_bin ## cross-compile binaries (linux, darwin, windows)
4242
docker cp $(CROSS_CTNR_NAME):$(PKG_PATH)/bin/$(BIN_NAME)-linux bin/$(BIN_NAME)-linux
4343
docker cp $(CROSS_CTNR_NAME):$(PKG_PATH)/bin/$(BIN_NAME)-darwin bin/$(BIN_NAME)-darwin
4444
docker cp $(CROSS_CTNR_NAME):$(PKG_PATH)/bin/$(BIN_NAME)-windows.exe bin/$(BIN_NAME)-windows.exe
45-
docker cp $(CROSS_CTNR_NAME):$(PKG_PATH)/bin/${BIN_STANDALONE_NAME}-linux bin/${BIN_STANDALONE_NAME}-linux
46-
docker cp $(CROSS_CTNR_NAME):$(PKG_PATH)/bin/${BIN_STANDALONE_NAME}-darwin bin/${BIN_STANDALONE_NAME}-darwin
47-
docker cp $(CROSS_CTNR_NAME):$(PKG_PATH)/bin/${BIN_STANDALONE_NAME}-windows.exe bin/${BIN_STANDALONE_NAME}-windows.exe
4845
docker rm $(CROSS_CTNR_NAME)
4946
@$(call chmod,+x,bin/$(BIN_NAME)-linux)
5047
@$(call chmod,+x,bin/$(BIN_NAME)-darwin)
5148
@$(call chmod,+x,bin/$(BIN_NAME)-windows.exe)
52-
@$(call chmod,+x,bin/${BIN_STANDALONE_NAME}-linux)
53-
@$(call chmod,+x,bin/${BIN_STANDALONE_NAME}-darwin)
54-
@$(call chmod,+x,bin/${BIN_STANDALONE_NAME}-windows.exe)
5549

5650
cli-cross: create_bin
5751
docker build $(BUILD_ARGS) --target=build -t $(CLI_IMAGE_NAME) .
@@ -85,11 +79,11 @@ e2e-cross: create_bin
8579
@$(call chmod,+x,bin/test2json-darwin)
8680

8781
tars:
88-
tar --transform='flags=r;s|$(BIN_NAME)-linux|$(BIN_NAME)-plugin-linux|' -czf bin/$(BIN_NAME)-linux.tar.gz -C bin $(BIN_NAME)-linux ${BIN_STANDALONE_NAME}-linux
82+
tar --transform='flags=r;s|$(BIN_NAME)-linux|$(BIN_NAME)-plugin-linux|' -czf bin/$(BIN_NAME)-linux.tar.gz -C bin $(BIN_NAME)-linux
8983
tar czf bin/$(BIN_NAME)-e2e-linux.tar.gz -C bin $(BIN_NAME)-e2e-linux
90-
tar --transform='flags=r;s|$(BIN_NAME)-darwin|$(BIN_NAME)-plugin-darwin|' -czf bin/$(BIN_NAME)-darwin.tar.gz -C bin $(BIN_NAME)-darwin ${BIN_STANDALONE_NAME}-darwin
84+
tar --transform='flags=r;s|$(BIN_NAME)-darwin|$(BIN_NAME)-plugin-darwin|' -czf bin/$(BIN_NAME)-darwin.tar.gz -C bin $(BIN_NAME)-darwin
9185
tar czf bin/$(BIN_NAME)-e2e-darwin.tar.gz -C bin $(BIN_NAME)-e2e-darwin
92-
tar --transform='flags=r;s|$(BIN_NAME)-windows|$(BIN_NAME)-plugin-windows|' -czf bin/$(BIN_NAME)-windows.tar.gz -C bin $(BIN_NAME)-windows.exe ${BIN_STANDALONE_NAME}-windows.exe
86+
tar --transform='flags=r;s|$(BIN_NAME)-windows|$(BIN_NAME)-plugin-windows|' -czf bin/$(BIN_NAME)-windows.tar.gz -C bin $(BIN_NAME)-windows.exe
9387
tar czf bin/$(BIN_NAME)-e2e-windows.tar.gz -C bin $(BIN_NAME)-e2e-windows.exe
9488

9589
test: test-unit test-e2e ## run all tests

vars.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
PKG_NAME := github.com/docker/app
22
BIN_NAME ?= docker-app
3-
BIN_STANDALONE_NAME := ${BIN_NAME}-standalone
43
E2E_NAME := $(BIN_NAME)-e2e
54

65
# Variables for fossa scan

0 commit comments

Comments
 (0)