Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Include Dockerfile in Repo #117

Closed
JohnOmernik opened this issue Feb 13, 2017 · 6 comments
Closed

Include Dockerfile in Repo #117

JohnOmernik opened this issue Feb 13, 2017 · 6 comments
Assignees
Labels

Comments

@JohnOmernik
Copy link

Include Dockerfile for building docker containers in TheHive repo

Feature Request

Work Environment

Question Answer
OS version (server) Docker
OS version (client) Docker
TheHive version / git hash Master
Package Type Docker
Browser type & version N/A

Problem Description

Please include the Docker files so we can build internally.

Steps to Reproduce

N/A

Possible Solutions

Include Dockerfile in ./docker

Complementary information

@To-om To-om self-assigned this Feb 13, 2017
@To-om To-om added the question label Feb 13, 2017
@To-om
Copy link
Contributor

To-om commented Feb 13, 2017

Dockerfile is generated by sbt native-packager plugin. You can generate it using the command (from sources):

bin/activator docker:stage

Then you will find all you want in target/docker/stage folder. The Dockerfile content is:

FROM elasticsearch:2.3
EXPOSE 9000
WORKDIR /opt/docker
ADD opt /opt
RUN ["chown", "-R", "daemon:daemon", "."]
RUN ["mkdir", "-p", "/data"]
RUN ["chown", "-R", "daemon:daemon", "/data"]
VOLUME ["/data"]
USER daemon
ENTRYPOINT ["bin/entrypoint"]
CMD []

@To-om To-om closed this as completed Feb 13, 2017
@dafal
Copy link

dafal commented Feb 2, 2018

It would be great to have the Dockerfile in the repository. Before installing an image I used to check the dockerfile. In this case I have to clone the repository and generate the file using the native-packager or to have a look at the TheHive/build.sbt file but it is not clear if you don't know how this native-packager works.

@ilyaglow
Copy link

Dockerfile alone can be used for an Automated Build option on docker hub, so you won't be bothered anymore to push images by yourself and as a bonus providing transparency for end users about what container really contains :)

@To-om To-om mentioned this issue Jul 31, 2018
@ilyaglow
Copy link

ilyaglow commented Nov 7, 2018

If anyone interested, I've made a dockerfile that builds image using github repository only: https://github.com/ilyaglow/dockerfiles/blob/master/thehive/Dockerfile

@hilt86
Copy link

hilt86 commented Aug 22, 2019

I followed the instructions and installed sbt and then used sbt docker:stage to generate a Dockerfile. I know close to nothing about Scala and nevertheless the build had some errors and was looking for credentials for Bintray, which appears to prevent the binaries from being built.

In summary the process as described either doesn't work or you need to be familiar with Scala to build a docker container. Usually Docker images build the binaries within the container and the docker.sbt seem to be generating the files and then copying them to the container, which I would guess could lead to very different Docker images depending on local versions.

Is there any way we can improve the build process and the Dockerfile generation process that doesn't require specialized knowledge?

@james-mchugh
Copy link

What are the advantages to automatically generating the Dockerfile as opposed to having one included in the repository? To me saying just that it can be generated and closing the issue is a poor response, as it is an antipatern for most tools that utilize Docker. It would be nice to have justification for why generating the Dockerfile is better.

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

No branches or pull requests

6 participants