Skip to content

kevinboss/port

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI CI

run and manage docker images with ease. Create snapshots from running containers, reset container to their inital image and save the state of running containers without the need to remember docker cli commands, even when using a remote docker engine.

Example

How to get it

Install using scoop

scoop bucket add maple 'https://github.com/kevinboss/maple.git'

scoop install port

Install using winget

Winget version

winget install kevinboss.port

Install manually

Latest release 💾

Then add folder to path $Env:PATH += ";C:\Path\To\Folder"

How to configure it

version: 1.1
dockerEndpoint: unix:///var/run/docker.sock
imageConfigs:
  - identifier: Getting.Started
    imageName: docker/getting-started
    imageTags:
      - latest
      - vscode
    ports:
      - 80:80
    environment:
      - DEBUG=1

A default .port file will be created in your user profile if you don't manually create one

Powershell

To get Unicode support in Powershell, add

[console]::InputEncoding = [console]::OutputEncoding = [System.Text.UTF8Encoding]::new()

to your $profile.

Commands Overview

Run an Image

  • Syntax: run [identifier] -r
  • Description: Executes a specified tag (base or snapshot) of an image.
  • Parameters:
    • identifier (optional): If omitted, a prompt will request image selection.
    • -r (reset) (optional): Resets the existing container for the specified image, if applicable.

List Images

  • Syntax: list [identifier]
  • Description: Displays all images and their tags.
  • Parameters:
    • identifier (optional): Limits the listing to images under the given identifier. Without it, all images are listed.

Commit a Container

  • Syntax: commit -t [identifier]
  • Description: Generates an image from the currently active container.
  • Parameters:
    • identifier (optional): If omitted, a prompt will request container selection.
    • -t (tag) (optional): Specifies the tag name. Defaults to the current date-time if not provided.

Reset a Container

  • Syntax: reset [identifier]
  • Description: Stops, removes, and recreates the container using its original image.
  • Parameters:
    • identifier (optional): If omitted, a prompt will request container selection.

Remove an Image

  • Syntax: remove -r [identifier]
  • Description: Deletes a specified image tag (base, snapshot, or untagged).
  • Parameters:
    • identifier (optional): If omitted, a prompt will request image selection.
    • -r (recursive) (optional): Automatically deletes child images. Without this, an error is raised if the image has dependents.

Pull an Image

  • Syntax: pull [identifier]
  • Description: Downloads a specified tag (base or snapshot) of an image.
  • Parameters:
    • identifier (optional): If omitted, a prompt will request image selection.

Prune Images

  • Syntax: prune [identifier]
  • Description: Removes untagged versions of an image.
  • Parameters:
    • identifier (optional): If omitted, a prompt will request image selection.

Stop a Container

  • Syntax: stop [identifier]
  • Description: Halts the operation of the currently active container.
  • Parameters:
    • identifier (optional): Specifies the container to stop. If omitted, operates on the current container.