Skip to content

Version 1.1

Choose a tag to compare

@avanchugov avanchugov released this 21 Jun 06:23
· 2 commits to main since this release

Version 1.1

Whats new?

馃搵 New standart options

  • --force - overwrite current Dockerfile and docker-compose.yml if it exists
  • --postgre - adds Postgres image to docker-compose.yml
  • --mongodb - adds Mongo image to docker-compose.yml

馃挕 Improved code readability

The application is divided into functions, everything is placed in different directories

馃帄 Templates

DockerCLI can also work with templates. Templates are presented as JSON files with a certain structure. Below is this structure

some.json

{
  "from": "ur_from",
  "dockerfile": [
    "WORKDIR /app",
    "${variable}",
    "CMD [\"Hello!\"]"
  ],
  "variables": {
    "variable": {
      "true": "Value or values if specified",
      "false": [
        "Value or values",
        "if not specified"
      ]
    }
  },
  "options": {
    "--someOption": "variable"
  },
  "compose": [
    "version: '3.8'",
    "${variable}",
    "",
    "services:",
    "  app:"
  ]
}

If you type

dockercli some --someOption

Then you see:

Dockerfile

FROM ur_from:lasted
WORKDIR /app
Value or values if specified
CMD ["Hello!"]

docker-compose.yml

version: '3.8'
Value or values if specified

services:
  app:

In templates, only --force and --v* work from standard options.

馃攷 Template command

dockercli template [create/delete] [name]

Creates or deletes template in path/to/dockercli/templates

E.x.

dockercli create java