Download the PHP package hut6/docker-cli-utils without Composer

On this page you can find all versions of the php package hut6/docker-cli-utils. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package docker-cli-utils

hut6/docker-cli-utils

Utilities to help with docker deployments

Prerequisites

You will need to create a deploy/deployer-hosts.yml inventory file (as per Deployer https://deployer.org/docs/hosts.html) and list all the hosts used for deployments.

A VERSION file is also required. Version increments can be managed with the tag-release script. The VERSION file is only required when pushing secrets to 1Password scripts because the title of the entry in 1Password will include the version in it. It is not used for anything else.

You will also need a custom deployer recipe, Dockerbuild file, and at least one Docker Compose file for each project. Example files are available at https://github.com/hut6/2020-docker-prod-boilerplate

Building

The image name will be determined using the git remote; if the remote is [email protected]:hut6/docker-cli-utils.git then the docker image will be called hut6/docker-cli-utils.

The command argument determines which commit is checked out, it can be a branch name, a tag, or a hash.

The argument will also be used as the tag for the Docker image. If building bin/build branch_name, then it will be tagged like this hut6/docker-cli-utils:branch_name. Another example would be bin/build 1.0.0 => hut6/docker-cli-utils:1.0.0.

When building the image, the local files are not used, the remote is used; changes need to be pushed to the remote before the image can be built.

Pushing

Same as above. bin/push branch_name will push hut6/docker-cli-utils:branch_name to DockerHub. The image needs to exist locally (ie needs to have been built).

Deploying

For each host, specify the Docker Compose file like this: compose_file: production.yml

First argument is the tag (as per build and push process) and second argument the host, as per the deploy/deployer-hosts.yml file. This will deploy hut6/docker-cli-utils:branch_name on the production host.

The image needs to exist on DockerHub.

Secrets Management

You'll need the 1Password CLI client op for push/pull.

Install it from https://support.1password.com/command-line/

Required files & directories

You'll need to create a /secrets directory which will contain a environment.env file for each of your deployment environments, eg production.env, or staging.env

Use the deploy/deployer-hosts.yml inventory file to specify which entry in 1Password should be used for each hosts, using the secrets_uuid key.

Pushing to 1Password

To push your file from the secrets directory to 1Password, run the following command.

Replace production with the right host key, as per your deploy/deployer-hosts.yml file.

The first time you run this command, it will ask you which vault needs to be used.

The same command can be used to update the entry in 1password after you make changes to production secrets file.

Pulling from 1Password

This will pull the secrets file from 1password, using the UUID specified in deploy/deployer-hosts.yml, and add it to the secrets directory.

Updating the docker secrets

This will load the secrets (from the secrets directory) into the docker daemon for the specified host. Containers likely will need restarting, and this command doesn't do this.


All versions of docker-cli-utils with dependencies

PHP Build Version
Package Version
Requires ext-json Version *
symfony/console Version >4.0
symfony/yaml Version >4.0
symfony/process Version >4.0
symfony/dotenv Version >4.0
ext-zip Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hut6/docker-cli-utils contains the following files

Loading the files please wait ...