Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ COPY . /go/src/github.com/docker/libcontainer
WORKDIR /go/src/github.com/docker/libcontainer
RUN cp sample_configs/minimal.json /busybox/container.json

RUN go get -d -v ./...
RUN make direct-install

ENTRYPOINT ["/dind"]
Expand Down
3 changes: 3 additions & 0 deletions configs/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ type Config struct {
// ReadonlyPaths specifies paths within the container's rootfs to remount as read-only
// so that these files prevent any writes.
ReadonlyPaths []string `json:"readonly_paths"`

// Container's standard descriptors (std{in,out,err}), needed for checkpoint and restore
StdFds [3]string `json:"ext_pipes,omitempty"`
}

// Gets the root uid for the process on host which could be non-zero
Expand Down
12 changes: 12 additions & 0 deletions container.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,18 @@ type Container interface {
// Systemerror - System error.
Start(process *Process) (err error)

// Checkpoint checkpoints the running container's state to disk using the criu(8) utility.
//
// errors:
// Systemerror - System error.
Checkpoint(criuOpts *CriuOpts) error

// Restore restores the checkpointed container to a running state using the criu(8) utiity.
//
// errors:
// Systemerror - System error.
Restore(p *Process, criuOpts *CriuOpts) error

// Destroys the container after killing all running processes.
//
// Any event registrations are removed before the container is destroyed.
Expand Down
Loading