From: Alan T. DeKok Date: Tue, 3 Oct 2017 12:39:36 +0000 (-0400) Subject: formatting X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd27ef79e90867124ecb5ba783fd5e628527e882;p=thirdparty%2Ffreeradius-server.git formatting so that it's readable in a terminal --- diff --git a/scripts/docker/README.md b/scripts/docker/README.md index 3af1227e7e8..c32b2ca0c49 100644 --- a/scripts/docker/README.md +++ b/scripts/docker/README.md @@ -1,13 +1,19 @@ # Docker build server images + ## Summary -The dockerfiles in this directory are pre-configured with all the dependencies necessary to build FreeRADIUS -packages. -They are mostly here for the FreeRADIUS development team, but 3rd party developers may also find them useful -if they're shipping their own packages, or performing debugging on behalf of the development team. +The dockerfiles in this directory are pre-configured with all the +dependencies necessary to build FreeRADIUS packages. + +They are mostly here for the FreeRADIUS development team, but 3rd +party developers may also find them useful if they're shipping their +own packages, or performing debugging on behalf of the development +team. ## Getting started + ### Building + As with any Dockerfile you'll first need to build the image: ```bash @@ -15,8 +21,8 @@ cd scripts/docker/build- docker build -t freeradius/-build . ``` -This will download the OS base image, install/build any dependencies as necessary, and perform a shallow clone -of the FreeRADIUS source. +This will download the OS base image, install/build any dependencies +as necessary, and perform a shallow clone of the FreeRADIUS source. The image will be tagged in the local ``freeradius/`` repository. @@ -29,13 +35,15 @@ freeradius/centos7-build latest 0b7af2e27bef 10 minutes ag centos centos7 3bee3060bfc8 2 weeks ago 193 MB ``` -You will now be able to execute the built image with an interactive shell from which you can perform -debugging or build packages. +You will now be able to execute the built image with an interactive +shell from which you can perform debugging or build packages. ### Running -The ``docker run`` command is used to create new containers from images. The command takes flags, and an -image identifier. In the example below the ``-it`` flags tell docker to operan an interactive terminal -on the container. + +The ``docker run`` command is used to create new containers from +images. The command takes flags, and an image identifier. In the +example below the ``-it`` flags tell docker to operan an interactive +terminal on the container. ```bash $ docker run -it freeradius/centos7-build @@ -45,34 +53,42 @@ aclocal.m4 config.sub COPYRIGHT doc LICENSE Makefile m autogen.sh configure CREDITS INSTALL.md m4 Make.inc.in missing redhat src ``` -When ``docker run`` is used to execute an image a new container is created from the image. This stores any changes -you make, whilst leaving the original container image unchanged. +When ``docker run`` is used to execute an image a new container is +created from the image. This stores any changes you make, whilst +leaving the original container image unchanged. -You can attach multiple terminals to a docker container with ``docker attach `` where hash is the temporary -container id (for the above example ``08a222f5fdfe``) displayed in the interactive shell provided by ``docker run``. +You can attach multiple terminals to a docker container with ``docker +attach `` where hash is the temporary container id (for the +above example ``08a222f5fdfe``) displayed in the interactive shell +provided by ``docker run``. -You may also give your containers explicit container IDs by passing ``--name `` to the ``docker run`` command. +You may also give your containers explicit container IDs by passing +``--name `` to the ``docker run`` command. ### Debugging -By default if you try to use GDB in a docker container, the pattach call will fail, and you will not be able to -trace processes. +By default if you try to use GDB in a docker container, the pattach +call will fail, and you will not be able to trace processes. -In order to allow tracing, the ``--privileged`` flag must be passed to ``docker run``, this restores any Linux -``cap`` privileges that would not ordinarily be given. +In order to allow tracing, the ``--privileged`` flag must be passed to +``docker run``, this restores any Linux ``cap`` privileges that would +not ordinarily be given. ### Networking -When docker is installed it creates a bridge interface. By default, any containers created will get an interface -on this bridge. +When docker is installed it creates a bridge interface. By default, +any containers created will get an interface on this bridge. -Docker provides IP addresses for containers on this bridge automatically, but as they are all in a private IP range -they are not routable from outside the host running docker. +Docker provides IP addresses for containers on this bridge +automatically, but as they are all in a private IP range they are not +routable from outside the host running docker. -The easiest way to get packets in and out of a container is to pass the ``-p`` flag to docker run. This binds a port -in the container, to a port on the docker host (similar to port forwarding). +The easiest way to get packets in and out of a container is to pass +the ``-p`` flag to docker run. This binds a port in the container, to +a port on the docker host (similar to port forwarding). -See [here](https://docs.docker.com/engine/userguide/networking/#embedded-dns-server) for more details on -docker networking. +See +[here](https://docs.docker.com/engine/userguide/networking/#embedded-dns-server) +for more details on docker networking.