Updating README for starting the container
Signed-off-by: rajasec <rajasec79@gmail.com> Updating README for starting the container Signed-off-by: rajasec <rajasec79@gmail.com> Updating README files for container start Signed-off-by: rajasec <rajasec79@gmail.com> updating README files for container start Signed-off-by: rajasec <rajasec79@gmail.com>
This commit is contained in:
parent
afaa21f79a
commit
0307c88ee9
10
README.md
10
README.md
|
@ -65,11 +65,11 @@ You can also run specific test cases by:
|
||||||
|
|
||||||
### Using:
|
### Using:
|
||||||
|
|
||||||
To run a container with the id "test", execute `runc start` with the containers id as arg one
|
To run a container with the id "test", execute `runc run` with the containers id as arg one
|
||||||
in the bundle's root directory:
|
in the bundle's root directory:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
runc start test
|
runc run test
|
||||||
/ $ ps
|
/ $ ps
|
||||||
PID USER COMMAND
|
PID USER COMMAND
|
||||||
1 daemon sh
|
1 daemon sh
|
||||||
|
@ -96,9 +96,9 @@ mkdir rootfs
|
||||||
docker export $(docker create busybox) | tar -C rootfs -xvf -
|
docker export $(docker create busybox) | tar -C rootfs -xvf -
|
||||||
```
|
```
|
||||||
* Create `config.json` by using `runc spec`.
|
* Create `config.json` by using `runc spec`.
|
||||||
* Execute `runc start` and you should be placed into a shell where you can run `ps`:
|
* Execute `runc run` and you should be placed into a shell where you can run `ps`:
|
||||||
```
|
```
|
||||||
$ runc start test
|
$ runc run test
|
||||||
/ # ps
|
/ # ps
|
||||||
PID USER COMMAND
|
PID USER COMMAND
|
||||||
1 root sh
|
1 root sh
|
||||||
|
@ -120,7 +120,7 @@ After=network.target
|
||||||
[Service]
|
[Service]
|
||||||
CPUQuota=200%
|
CPUQuota=200%
|
||||||
MemoryLimit=1536M
|
MemoryLimit=1536M
|
||||||
ExecStart=/usr/local/sbin/runc start minecraft
|
ExecStart=/usr/local/sbin/runc run minecraft
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
WorkingDirectory=/containers/minecraftbuild
|
WorkingDirectory=/containers/minecraftbuild
|
||||||
|
|
||||||
|
|
2
main.go
2
main.go
|
@ -37,7 +37,7 @@ The root filesystem contains the contents of the container.
|
||||||
|
|
||||||
To start a new instance of a container:
|
To start a new instance of a container:
|
||||||
|
|
||||||
# runc start [ -b bundle ] <container-id>
|
# runc run [ -b bundle ] <container-id>
|
||||||
|
|
||||||
Where "<container-id>" is your name for the instance of the container that you
|
Where "<container-id>" is your name for the instance of the container that you
|
||||||
are starting. The name you provide for the container instance must be unique on
|
are starting. The name you provide for the container instance must be unique on
|
||||||
|
|
4
spec.go
4
spec.go
|
@ -42,9 +42,9 @@ command in a new hello-world container named container1:
|
||||||
tar -C rootfs -xf hello-world.tar
|
tar -C rootfs -xf hello-world.tar
|
||||||
runc spec
|
runc spec
|
||||||
sed -i 's;"sh";"/hello";' ` + specConfig + `
|
sed -i 's;"sh";"/hello";' ` + specConfig + `
|
||||||
runc start container1
|
runc run container1
|
||||||
|
|
||||||
In the start command above, "container1" is the name for the instance of the
|
In the run command above, "container1" is the name for the instance of the
|
||||||
container that you are starting. The name you provide for the container instance
|
container that you are starting. The name you provide for the container instance
|
||||||
must be unique on your host.
|
must be unique on your host.
|
||||||
|
|
||||||
|
|
|
@ -71,8 +71,8 @@ function teardown() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "this is a simple test" {
|
@test "this is a simple test" {
|
||||||
runc start containerid
|
runc run containerid
|
||||||
# "run" automatically populates $status, $output and $lines.
|
# "The runc macro" automatically populates $status, $output and $lines.
|
||||||
# Please refer to bats documentation to find out more.
|
# Please refer to bats documentation to find out more.
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue