GithubHelp home page GithubHelp logo

tomponline / go-lxc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lxc/go-lxc

0.0 2.0 0.0 746 KB

Go bindings for liblxc

Home Page: https://linuxcontainers.org/lxc

License: Other

Makefile 1.24% Go 84.39% C 14.37%

go-lxc's Introduction

go-lxc

Go Bindings for LXC (Linux Containers)

LXC is the well-known and heavily tested low-level Linux container runtime. It is in active development since 2008 and has proven itself in critical production environments world-wide. Some of its core contributors are the same people that helped to implement various well-known containerization features inside the Linux kernel.

This package implements Go bindings for the LXC C API (liblxc).

Status

Type Service Status
CI (Linux) Github CI tests
Go documentation Godoc GoDoc
Static analysis GoReport Go Report Card

Requirements

This package requires LXC >= 1.0.0 and its development package and their dependencies to be installed. Additionally, go-lxc requires Golang 1.10 or later to work. Following command should install required dependencies on Ubuntu 18.10:

sudo apt update
sudo apt install git golang gcc make liblxc1 liblxc-dev lxc-utils pkg-config

Installing

To install it, run:

go get github.com/lxc/go-lxc

Trying

To try examples, run:

# cd ~/go/src/github.com/lxc/go-lxc/examples/

# make
==> Running go vet
==> Building ...
...

# create/create
2018/12/27 22:39:27 Creating container...

# start/start
2018/12/27 22:39:39 Starting the container...
2018/12/27 22:39:39 Waiting container to startup networking...

# attach/attach
2018/12/27 22:39:46 AttachShell
root@rubik:/# hostname
rubik
root@rubik:/# exit
exit
2018/12/27 22:39:52 RunCommand
uid=0(root) gid=0(root) groups=0(root)

# stop/stop
2018/12/27 22:39:54 Stopping the container...

# destroy/destroy
2018/12/27 22:39:57 Destroying container...

Backwards Compatibility

LXC has always focused on strong backwards compatibility. In fact, the API hasn't been broken from release 1.0.0 onwards. Main LXC is currently at version 2.*.*.

Examples

See the examples directory for some.

Bug reports

Bug reports can be filed at: https://github.com/lxc/go-lxc/issues/new

Contributing

Fixes and new features are greatly appreciated. We'd love to see go-lxc improve. To contribute to go-lxc;

  • Fork the repository
  • Modify your fork
  • Ensure your fork passes all tests
  • Send a pull request
    • Bonus points if the pull request includes what you changed, why you changed it, and tests attached.

Getting help

When you find you need help, the LXC projects provides you with several options.

Discuss Forum

We maintain an discuss forum at

where you can get support.

IRC

You can find support by joining #lxcontainers on Freenode.

Mailing Lists

You can check out one of the two LXC mailing list archives and register if interested:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.