Skip to content

kevinboss/port

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Port Logo

πŸš€ Port: Simplified Docker Image Management

CI CI License: GPL-3.0

Port streamlines the management of Docker images and containers, empowering you to:

  • ▢️ Run containers effortlessly with simple commands.
  • ⏹️ Stop running containers seamlessly.
  • πŸ“‹ List all containers to keep track of their status.
  • πŸ—‘οΈ Remove unwanted containers to free up resources.
  • πŸ”„ Reset containers to their original state for reusability.
  • πŸ’Ύ Save container states for future use or backups.

All this without the hassle of memorizing complex Docker CLI commands, even when working with remote Docker engines.

Port in Action

πŸ“₯ Installation

Scoop

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

Winget

winget install kevinboss.port

Manual Installation

  1. πŸ“‚ Download the latest release from the Releases Page.

  2. πŸ› οΈ Add the folder to your system PATH:

    $Env:PATH += "C:\Path\To\Folder"

βš™οΈ Configuration

Configure Port by creating a config.yml file:

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.

πŸ§‘β€πŸ’» Usage

Commands

  • ▢️ Run an Image:

    Run a specific tag (base or snapshot) of an image:

    port run [identifier] -r
    • identifier (optional): If omitted, a prompt will request image selection.
    • -r (reset) (optional): Resets the existing container for the specified image, if applicable.
  • ⏹️ Stop a Container:

    Stop a running container:

    port stop [identifier]
    • identifier (optional): Specifies the container to stop. If omitted, operates on the current container.
  • πŸ“‹ List Images:

    Display all images and their tags:

    port list [identifier]
    • identifier (optional): Limits the listing to images under the given identifier. Without it, all images are listed.
  • πŸ—‘οΈ Remove an Image:

    Delete a specific image tag (base, snapshot, or untagged):

    port remove -r [identifier]
    • 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.
  • πŸ”„ Reset a Container:

    Stop, remove, and recreate the container using its original image:

    port reset [identifier]
    • identifier (optional): If omitted, a prompt will request container selection.
  • πŸ’Ύ Commit a Container:

    Generate an image from the currently active container:

    port commit -t [identifier]
    • 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.
    • -o (overwrite) (optional): Re-uses the running image and replaces the existing one.
  • πŸ“₯ Pull an Image:

    Download a specific tag (base or snapshot) of an image:

    port pull [identifier]
    • identifier (optional): If omitted, a prompt will request image selection.
  • πŸ› οΈ Prune Images:

    Remove untagged versions of an image:

    port prune [identifier]
    • identifier (optional): If omitted, a prompt will request image selection.

Powershell

To get Unicode support in Powershell, add:

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

to your $profile.

🀝 Contributing

We welcome contributions to improve Port! Please follow the steps below:

  1. 🍴 Fork the repository.
  2. 🌱 Create a new branch for your feature or bug fix.
  3. πŸ’Ύ Commit your changes.
  4. πŸ”„ Submit a pull request.

πŸ“„ License

This project is licensed under the GPL-3.0 License.