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

Dockerfile #75

Merged
merged 78 commits into from Aug 7, 2020
Merged

Dockerfile #75

merged 78 commits into from Aug 7, 2020

Conversation

ChakshuGupta
Copy link
Collaborator

Add Dockerfile to setup the development environment in a docker.

Copy link
Collaborator

@dhirensr dhirensr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this like for which process?

Copy link
Collaborator

@dhirensr dhirensr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should remove the comments if we don't need to RUN these commands

Copy link
Collaborator

@dhirensr dhirensr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should run sudo python ohp.py -m all and not only the api server

Copy link
Collaborator

@dhirensr dhirensr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't want to support Python2 because it's officially stopped support so we can remove the packages and libraries for python2

@ChakshuGupta
Copy link
Collaborator Author

I incorporated some of the suggested changes. Please take a look.

@dhirensr
Copy link
Collaborator

@ChakshuGupta : looks good to me but could you explain why did you include to install wheel package via pip separately?

@ChakshuGupta
Copy link
Collaborator Author

@dhirensr I was getting the following error -
error: invalid command 'bdist_wheel'----------------------------------------Failed building wheel for scandir

And this package was not part of the requirements.txt files. Should I add it to the files instead?

Copy link
Collaborator

@dhirensr dhirensr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChakshuGupta : I have left a review. let me know if you have any questions

Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@dhirensr
Copy link
Collaborator

@ChakshuGupta : I am getting errors when I am trying to install it via pip3 and not pip because in your file you have used pip install which uses python2 and not python3.
I will try to fix the problem this week. let me know if you have a solution already

@ChakshuGupta
Copy link
Collaborator Author

@dhirensr Installing python requirements from the requirements.txt files were giving errors with pip3. That's why I left it with pip. I am trying to find a solution for that so everything can be with pip3.

@dhirensr
Copy link
Collaborator

@ChakshuGupta : could you tell for which package are you getting errors? maybe it's a problem of python3 version
try it with python3.7 (any version) and let me know

@ChakshuGupta
Copy link
Collaborator Author

terminable_thread is giving error -

Collecting terminable_thread==0.7.1 (from -r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/10/b4/9530368ac75a9023836514a305e08853b57f859c01b5fcf1aa9f7971d460/terminable_thread-0.7.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-aqpy_iyz/terminable-thread/setup.py", line 29, in
long_description = file_contents('README.rst'),
File "/tmp/pip-build-aqpy_iyz/terminable-thread/setup.py", line 16, in file_contents
return f.read()
File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1582: ordinal not in range(128)

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-aqpy_iyz/terminable-thread/
The command '/bin/sh -c pip3 install -r requirements.txt' returned a non-zero code: 1

I have tried a lot of things.. I am not able to find a solution for this.

Copy link

@abiusx abiusx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to use docker-compose and also make sure to use docker-in-docker for a large project like this.

Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@ChakshuGupta
Copy link
Collaborator Author

@abiusx Thank you for the feedback. I am new to docker. I'll look into docker-compose and docker-in-docker and update accordingly.

@Ali-Razmjoo Ali-Razmjoo removed the request for review from abiusx May 28, 2020 10:29
@Ali-Razmjoo Ali-Razmjoo added this to To Do in First Version Release via automation Aug 7, 2020
@Ali-Razmjoo Ali-Razmjoo added the priority Priority label Aug 7, 2020
@Ali-Razmjoo Ali-Razmjoo self-requested a review August 7, 2020 22:09
@Ali-Razmjoo
Copy link
Collaborator

docs should be added to wiki #117

@Ali-Razmjoo Ali-Razmjoo merged commit 794432b into OWASP:development Aug 7, 2020
First Version Release automation moved this from To Do to Done Aug 7, 2020
@ChakshuGupta ChakshuGupta deleted the dockerfile branch August 8, 2020 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants