docs: Add docs for docker usage
This commit is contained in:
11
Makefile
11
Makefile
@@ -329,4 +329,15 @@ deb:
|
|||||||
# cleanup
|
# cleanup
|
||||||
rm -rf debian/mgmt/
|
rm -rf debian/mgmt/
|
||||||
|
|
||||||
|
build_container:
|
||||||
|
docker build -t purpleidea/mgmt-build -f docker/Dockerfile.build .
|
||||||
|
docker run -td --name mgmt-build purpleidea/mgmt-build
|
||||||
|
docker cp mgmt-build:/root/gopath/src/github.com/purpleidea/mgmt/mgmt .
|
||||||
|
docker build -t purpleidea/mgmt -f docker/Dockerfile.static .
|
||||||
|
docker rm mgmt-build || true
|
||||||
|
|
||||||
|
clean_container:
|
||||||
|
docker rmi purpleidea/mgmt-build
|
||||||
|
docker rmi purpleidea/mgmt
|
||||||
|
|
||||||
# vim: ts=8
|
# vim: ts=8
|
||||||
|
|||||||
12
docker/Dockerfile.build
Normal file
12
docker/Dockerfile.build
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
FROM centos:7
|
||||||
|
MAINTAINER Karim Boumedhel <karimboumedhel@gmail.com>
|
||||||
|
|
||||||
|
ENV GOPATH=/root/gopath
|
||||||
|
ENV PATH=/opt/rh/rh-ruby22/root/usr/bin:/root/gopath/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/go/bin
|
||||||
|
ENV LD_LIBRARY_PATH=/opt/rh/rh-ruby22/root/usr/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
|
||||||
|
ENV PKG_CONFIG_PATH=/opt/rh/rh-ruby22/root/usr/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}
|
||||||
|
|
||||||
|
RUN yum -y install epel-release wget unzip git make which centos-release-scl gcc && sed -i "s/enabled=0/enabled=1/" /etc/yum.repos.d/epel-testing.repo && yum -y install rh-ruby22 && wget -O /opt/go1.9.1.linux-amd64.tar.gz https://storage.googleapis.com/golang/go1.9.1.linux-amd64.tar.gz && tar -C /usr/local -xzf /opt/go1.9.1.linux-amd64.tar.gz
|
||||||
|
RUN mkdir -p $GOPATH/src/github.com/purpleidea && cd $GOPATH/src/github.com/purpleidea && git clone --recursive https://github.com/purpleidea/mgmt
|
||||||
|
RUN go get -u gopkg.in/alecthomas/gometalinter.v1 && cd $GOPATH/src/github.com/purpleidea/mgmt && make deps && make build
|
||||||
|
CMD ["/bin/bash"]
|
||||||
9
docker/Dockerfile.static
Normal file
9
docker/Dockerfile.static
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
FROM centos:7
|
||||||
|
MAINTAINER Karim Boumedhel <karimboumedhel@gmail.com>
|
||||||
|
|
||||||
|
RUN yum -y install augeas-libs libvirt-libs && yum clean all
|
||||||
|
ADD mgmt /usr/bin
|
||||||
|
RUN chmod 700 /usr/bin/mgmt
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/bin/mgmt"]
|
||||||
|
CMD ["-h"]
|
||||||
@@ -76,6 +76,11 @@ If you would like to avoid doing the above steps manually, we have prepared a
|
|||||||
project directory, run a `vagrant up`, and then a `vagrant status`. From there,
|
project directory, run a `vagrant up`, and then a `vagrant status`. From there,
|
||||||
you can `vagrant ssh` into the `mgmt` machine. The MOTD will explain the rest.
|
you can `vagrant ssh` into the `mgmt` machine. The MOTD will explain the rest.
|
||||||
|
|
||||||
|
## Using Docker
|
||||||
|
|
||||||
|
Alternatively, you can check [docker-guide](docs/docker-guide.md) in order to
|
||||||
|
develop or deploy using docker
|
||||||
|
|
||||||
## Information about dependencies
|
## Information about dependencies
|
||||||
|
|
||||||
Software projects have a few different kinds of dependencies. There are _build_
|
Software projects have a few different kinds of dependencies. There are _build_
|
||||||
|
|||||||
Reference in New Issue
Block a user