Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adding documentation for docker usage #339

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

leophys
Copy link
Member

@leophys leophys commented Jan 26, 2018

Simple documentation section to benefit from docker usage.

@leophys leophys requested a review from ael-code January 26, 2018 19:51
@leophys leophys added the docs label Jan 26, 2018
@boyska
Copy link
Member

boyska commented Jan 26, 2018

have we ever tested if our docker is fine for production? does it work smoothly? I think that #333 was mostly about checking installation steps that making a production-ready dockerfile.

you said:

We ship a Dockerfile that allows one to build and run a container with a
working version of libreant running, bound to port 5000.

do we? I don't think we ship one Dockerfile in the root directory; we ship many dockerfiles, for many distros, in .docker. None of them is under CI (but that could be fixed).

So I think that this PR can get merged once we test a Dockerfile better and promote it as a way of installing it for production.

But, I still do not see any advantage in installing libreant in a docker container: isn't it easier to just run sudo pip3 install libreant and then run /usr/local/bin/libreant ? Sure, installing ES is often painful, so I understand the usage of docker for elasticsearch, but this doesn't require the usage of docker for libreant at all.

@leophys
Copy link
Member Author

leophys commented Jan 28, 2018

@boyska , i wasn't thinking about docker images for production, but for testing 😊

you said:

We ship a Dockerfile that allows one to build and run a container with a
working version of libreant running, bound to port 5000.

do we? I don't think we ship one Dockerfile in the root directory; we ship many dockerfiles, for many distros, >in .docker. None of them is under CI (but that could be fixed).

Regarding this, you're right 😁 , and I really don't know/remember where the following Dockerfile I found in my directory comes from, but it is indeed not under version control.

FROM debian:stable-slim

# Install the base system requirements: python, pip
RUN apt-get update && apt-get install -y --no-install-recommends \
		python2.7 \
		python-pip\
&& rm -rf /var/lib/apt/lists/*

RUN pip install --upgrade pip setuptools wheel

ENV LIBREANT_INST_DIR /libreant

ARG ES_VERSION
ENV ES_VERSION=$ES_VERSION

# Import libreant source from current local folder
ADD . ${LIBREANT_INST_DIR}/

# Install libreant
WORKDIR $LIBREANT_INST_DIR
RUN pip2 install .

EXPOSE 5000

CMD libreant

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants