Sign inSign up

packtcli/packt-cli

By packtcli

•Updated 8 days ago

Image
0

2.1K

packtcli/packt-cli repository overview

⁠Free Learning Docker images

These images are automatic built from https://gitlab.com/packtcli/packt-cli⁠.

You can find images for master and dev branches (commit naming). Master branch image is also tagged with version number.

One file and two main directories :

  • /app/configFile.cfg : file containing the packt-cli config
  • /app/.credentials : directory used by Google API. If you need google drive, GoogleDriveManager.json file should be placed under this directory,
  • /app/data : directory corresponding to download_folder_path:* (/app/data) in configFile.cfg

You can override PACKT_CLI_ARGS (default --help) at runtime.

Typical docker run command :

docker run -it --rm --name Packt \
  -v "${HOST_APP_CONFIG_FILE}:/app/configFile.cfg" \
  -v "${HOST_APP_GDRIVE_CREDENTIALS_DIR}:/app/.credentials" \
  -v "${HOST_APP_DATA_DIR}:/data" \
  --env PACKT_CLI_ARGS=--sgd -sm \
  packtcli/packt-cli packt-cli

Please find my stack :

services:
  packt-cli:
    container_name: packt-cli
    environment:
      - PACKT_CLI_ARGS=-sgd -sm
    image: packtcli/packt-cli
    volumes:
      # config file
      - /mnt/d/DOCKER/dk_packt-cli/config/configFile.cfg:/app/configFile.cfg
      # directory for google drive credentials settings
      - /mnt/d/DOCKER/dk_packt-cli/config/.credentials:/app/.credentials
      # directory for downloading files
      - /mnt/d/DOCKER/dk_packt-cli/data:/app/data
    restart: no
    network_mode: bridge
    stdin_open: true
    tty: true
    entrypoint: /bin/sh -c "packt-cli $${PACKT_CLI_ARGS}"
networks: {}

Changing entrypoint can be useful to get into the container and set googledrive credentials. See details about setting config here (Google Drive API Setup) : https://gitlab.com/packtcli/packt-cli/-/blob/pypi/README.md⁠

docker run -it --rm \
  --name Packt \
  -v "${HOST_APP_CONFIG_FILE}:/app/configFile.cfg" \
  -v "${HOST_APP_GDRIVE_CREDENTIALS_DIR}:/app/.credentials" \
  -v "${HOST_APP_DATA_DIR}:/app/data" \
  --entrypoint /bin/sh \
  packtcli/packt-cli

You can then enter (from inside the container):

  packt-cli -c /app/configFile.cfg -sgd --noauth_local_webserver

Tag summary

Content type

Image

Digest

sha256:eaa573de6…

Size

75.2 MB

Last updated

8 days ago

docker pull packtcli/packt-cli