cmd/docker: add docker "app" command and install/launch/remove subcommands
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
Applications are defined as binaries that can execute on the host architecture (docker itself included)
The following new CLI sub commands are supported:
- install: install an application from a URL resource
- launch: run an application from a URL resource
- remove: remove installed applications
The install sub command combines the existing docker features of building image, running container, and copying the artifacts from the container down to the host machine
in one go. The final released files are assumed to be packaged under /egress after the docker image is built or the container is run.
The --egress flag can be used to change the default location.
The installation process varies slightly depending on the number of downloaded files and the users' options.
All the files are installed under ~/.docker/app by default, which can be changed with environment variable DOCKER_APP_BASE and the
--destination flag on the command line. Each app has its own app path - a subdirectory under the app base that is derived from the URL resource
in the form of <appBase>/pkg/scheme/host/path.
-
Single file
If the app is a single binary, it is copied under its app directory and a symlink is created in the /bin -
Multiple files with a special file named "run"
All files are copied to the app's directory and a symlink is created to therunfile in /bin
- Multiple files with a special file named "install"
All files are copied to the app's directory or a location set by the--destinationflag and theinstallis run as a post install step.
If --launch flag is set to true for the above cases 1 and 2, the app will be started after the installation.
The launch sub command performs similar steps of building image and running container, but copies the packaged files from
container to a temporary location on the host. This command only applies to a single binary app or one with a special run file.
The remove sub command removes all the files of an app under its package path and its symlink in the bin directory.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in cmd/docker and inspect the existing image-building, container-running, and artifact-copying features referenced by the issue. Trace how CLI subcommands and flags are defined, then determine how install, launch, and remove should cover the three packaging cases and destination rules. Done means the app command supports the stated subcommands, storage paths, symlinks, and launch behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100