pygmystack / pygmy

the pygmy stack is a container stack for local development
MIT License
25 stars 13 forks source link

Request for example pygmy cowsay integration #63

Closed fubarhouse closed 4 years ago

fubarhouse commented 4 years ago

Background

This configuration example serves no practical application, however provides a POC example for showing the stdout of a container on-start to achieve a specific outcome. In this case we would be running an arbitrary image, passing arguments onto the container in typical docker run ... fashion.

Implementation

Docker

docker run -it --rm mbentley/cowsay holy ship!

Variables

n/a

Volumes

n/a

fubarhouse commented 4 years ago

Services

  example-cowsay:
    name: example-cowsay
    discrete: true
    output: true
    weight: 99
    Config:
      Image: mbentley/cowsay
      Cmd:
        - holy
        - ship
    HostConfig:
      AutoRemove: true
fubarhouse commented 4 years ago

Note that output logic needs work, but the following config works.

  example-cowsay:
    name: example-cowsay
    Config:
      Image: mbentley/cowsay
      Cmd:
        - holy
        - ship
      Labels:
        - pygmy: pygmy
        - pygmy.enable: true
        - pygmy.discrete: true
        - pygmy.name: example-cowsay
        - pygmy.output: true
        - pygmy.weight: 99
    HostConfig:
      AutoRemove: true