ghost-project

module
v0.0.0-...-f5ca46c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2024 License: Apache-2.0

README

Setting up the Root Filesystem (rootfs)

To begin, you'll need a root filesystem (rootfs). It is recommended to use a stopped Docker container for this. I exported the rootfs from a stopped Alpine Docker container.

Creating the Configuration File

Next, create a container.json configuration file with the following content:

{
    "id": "test-container",
    "command": {
      "args": ["/bin/bash"]
    },
    "rootfs": "/home/rojin/dev/test",
    "namespaces": ["NEWNET", "NEWIPC", "NEWNS", "NEWPID", "NEWUTS"],
    "capabilities": ["SYS_ADMIN", "SYS_RESOURCE"]
}

Notes:

  • Capabilities: You don’t need to worry about capabilities for now; feel free to omit or ignore them.
  • Command: Replace the command argument ("/bin/bash") with the desired command or script you'd like to execute.

Executing the Binary

Once you’ve set up the container.json, execute the binary as follows:

sudo ./ghost-project exec --config=container.json

Directories

Path Synopsis
cmd
ghost-project command
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL