2014-04-16 10:53:12 +10:00
|
|
|
page_title: Installation on CRUX Linux
|
|
|
|
page_description: Docker installation on CRUX Linux.
|
|
|
|
page_keywords: crux linux, virtualization, Docker, documentation, installation
|
|
|
|
|
|
|
|
# CRUX Linux
|
|
|
|
|
2014-04-18 23:21:55 +03:00
|
|
|
> **Note**:
|
2014-04-23 23:48:28 +03:00
|
|
|
> Docker is still under heavy development! We don't recommend using it in
|
|
|
|
> production yet, but we're getting closer with each release. Please see
|
2014-04-18 23:21:55 +03:00
|
|
|
> our blog post, [Getting to Docker 1.0](
|
|
|
|
> http://blog.docker.io/2013/08/getting-to-docker-1-0/)
|
|
|
|
|
|
|
|
> **Note**:
|
2014-04-23 23:48:28 +03:00
|
|
|
> This is a community contributed installation path. The only `official`
|
2014-04-18 23:21:55 +03:00
|
|
|
> installation is using the [*Ubuntu*](../ubuntulinux/#ubuntu-linux)
|
|
|
|
> installation path. This version may be out of date because it depends on
|
|
|
|
> some binaries to be updated and published.
|
2014-04-16 10:53:12 +10:00
|
|
|
|
|
|
|
Installing on CRUX Linux can be handled via the ports from [James
|
|
|
|
Mills](http://prologic.shortcircuit.net.au/):
|
|
|
|
|
2014-04-23 23:48:28 +03:00
|
|
|
- [docker](https://bitbucket.org/prologic/ports/src/tip/docker/)
|
|
|
|
- [docker-bin](https://bitbucket.org/prologic/ports/src/tip/docker-bin/)
|
|
|
|
- [docker-git](https://bitbucket.org/prologic/ports/src/tip/docker-git/)
|
2014-04-16 10:53:12 +10:00
|
|
|
|
|
|
|
The `docker` port will install the latest tagged
|
|
|
|
version of Docker. The `docker-bin` port will
|
|
|
|
install the latest tagged versin of Docker from upstream built binaries.
|
|
|
|
The `docker-git` package will build from the current
|
|
|
|
master branch.
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
For the time being (*until the CRUX Docker port(s) get into the official
|
|
|
|
contrib repository*) you will need to install [James
|
2014-04-23 23:48:28 +03:00
|
|
|
Mills`](https://bitbucket.org/prologic/ports) ports repository. You can
|
2014-04-16 10:53:12 +10:00
|
|
|
do so via:
|
|
|
|
|
|
|
|
Download the `httpup` file to
|
|
|
|
`/etc/ports/`:
|
|
|
|
|
2014-05-01 17:13:34 +03:00
|
|
|
$ curl -q -o - http://crux.nu/portdb/?a=getup&q=prologic > /etc/ports/prologic.httpup
|
2014-04-16 10:53:12 +10:00
|
|
|
|
|
|
|
Add `prtdir /usr/ports/prologic` to
|
|
|
|
`/etc/prt-get.conf`:
|
|
|
|
|
2014-05-01 17:13:34 +03:00
|
|
|
$ vim /etc/prt-get.conf
|
2014-04-16 10:53:12 +10:00
|
|
|
|
|
|
|
# or:
|
2014-05-01 17:13:34 +03:00
|
|
|
$ echo "prtdir /usr/ports/prologic" >> /etc/prt-get.conf
|
2014-04-16 10:53:12 +10:00
|
|
|
|
|
|
|
Update ports and prt-get cache:
|
|
|
|
|
2014-05-01 17:13:34 +03:00
|
|
|
$ ports -u
|
|
|
|
$ prt-get cache
|
2014-04-16 10:53:12 +10:00
|
|
|
|
|
|
|
To install (*and its dependencies*):
|
|
|
|
|
2014-05-01 17:13:34 +03:00
|
|
|
$ prt-get depinst docker
|
2014-04-16 10:53:12 +10:00
|
|
|
|
|
|
|
Use `docker-bin` for the upstream binary or
|
|
|
|
`docker-git` to build and install from the master
|
|
|
|
branch from git.
|
|
|
|
|
|
|
|
## Kernel Requirements
|
|
|
|
|
|
|
|
To have a working **CRUX+Docker** Host you must ensure your Kernel has
|
|
|
|
the necessary modules enabled for LXC containers to function correctly
|
|
|
|
and Docker Daemon to work properly.
|
|
|
|
|
|
|
|
Please read the `README.rst`:
|
|
|
|
|
2014-05-01 17:13:34 +03:00
|
|
|
$ prt-get readme docker
|
2014-04-16 10:53:12 +10:00
|
|
|
|
|
|
|
There is a `test_kernel_config.sh` script in the
|
|
|
|
above ports which you can use to test your Kernel configuration:
|
|
|
|
|
2014-05-01 17:13:34 +03:00
|
|
|
$ cd /usr/ports/prologic/docker
|
|
|
|
$ ./test_kernel_config.sh /usr/src/linux/.config
|
2014-04-16 10:53:12 +10:00
|
|
|
|
|
|
|
## Starting Docker
|
|
|
|
|
|
|
|
There is a rc script created for Docker. To start the Docker service:
|
|
|
|
|
2014-05-01 17:13:34 +03:00
|
|
|
$ sudo su -
|
|
|
|
$ /etc/rc.d/docker start
|
2014-04-16 10:53:12 +10:00
|
|
|
|
|
|
|
To start on system boot:
|
|
|
|
|
2014-04-23 23:48:28 +03:00
|
|
|
- Edit `/etc/rc.conf`
|
|
|
|
- Put `docker` into the `SERVICES=(...)` array after `net`.
|