Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/docker: add docker "app" command and install/launch/remove subcommands #5239

Open
qiangli opened this issue Jul 6, 2024 · 1 comment

Comments

@qiangli
Copy link

qiangli commented Jul 6, 2024

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.

  1. Single file
    If the app is a single binary, it is copied under its app directory and a symlink is created in the /bin

  2. Multiple files with a special file named "run"
    All files are copied to the app's directory and a symlink is created to the run file in /bin

  1. Multiple files with a special file named "install"
    All files are copied to the app's directory or a location set by the --destination flag and the install is 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.

@qiangli
Copy link
Author

qiangli commented Jul 6, 2024

PR: #5240

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant