Sign inSign up

aiqu/container-linux-config-transpiler

By aiqu

•Updated over 7 years ago

Run ct from docker container

Image
0

1.1K

aiqu/container-linux-config-transpiler repository overview

⁠dockerfile-container-linux-config-transpiler

For official ct-examples, you can check here⁠

⁠Basic Examples for using this image

⁠Output to stdout
docker run --rm -it -v $PWD/examples/example.yml:/tmp/example.yml aiqu/container-linux-config-transpiler:latest -in-file /tmp/example.yml
⁠Output to file on host
docker run --rm -it --mount type=bind,source=$PWD/examples/,target=/tmp/ aiqu/container-linux-config-transpiler:latest -in-file /tmp/example.yml -out-file /tmp/outfile.json

example.yml:

storage:
  files:
    - path: /opt/file1
      filesystem: root
      contents:
        inline: Hello, world!
      mode: 0644
      user:
        id: 500
      group:
        id: 501

resulting output (with '-pretty')

{
  "ignition": {
    "config": {},
    "security": {
      "tls": {}
    },
    "timeouts": {},
    "version": "2.2.0"
  },
  "networkd": {},
  "passwd": {},
  "storage": {
    "files": [
      {
        "filesystem": "root",
        "group": {
          "id": 501
        },
        "path": "/opt/file1",
        "user": {
          "id": 500
        },
        "contents": {
          "source": "data:,Hello%2C%20world!",
          "verification": {}
        },
        "mode": 420
      }
    ]
  },
  "systemd": {}
}

Resulting output (without '-pretty'):

{"ignition":{"config":{},"security":{"tls":{}},"timeouts":{},"version":"2.2.0"},"networkd":{},"passwd":{},"storage":{"files":[{"filesystem":"root","group":{"id":501},"path":"/opt/file1","user":{"id":500},"contents":{"source":"data:,Hello%2C%20world!","verification":{}},"mode":420}]},"systemd":{}}

Tag summary

Content type

Image

Digest

Size

125.3 MB

Last updated

over 7 years ago

docker pull aiqu/container-linux-config-transpiler