Conversation
Member
|
Sorry for not answering this for so long. I have personally no experience with docker so I am not really sure on how to handle this. |
chrisz100
suggested changes
Mar 25, 2019
| FROM python:2.7 | ||
| RUN apt update | ||
| RUN apt upgrade -y | ||
| RUN apt install vim -y |
Member
There was a problem hiding this comment.
Can you combine this?
RUN apt update && apt upgrade -y && apt clean
And why vim?
| RUN apt install vim -y | ||
| RUN mkdir /sabot | ||
| WORKDIR /sabot | ||
| ADD . /sabot |
Member
There was a problem hiding this comment.
If you resort this, this could save some layers:
ADD . /sabot WORKDIR /sabot
| - sabot/settings.py | ||
| - sabot/conferenceSettings.py | ||
| - sabot/localSettings.py (and sabot/prodSettings.py if you want to distinguish a development and a production version) from their example files (prodSettings.py needs the same parameters) | ||
| - Make sure that `PROJECT_ROOT = '/sabot'` is set in sabot/localSettings.py (or sabot/prodSettings.py) |
Member
There was a problem hiding this comment.
Please mount them using volume mounts or something like this, don't compile them into the docker image.
| WORKDIR /sabot | ||
| ADD . /sabot | ||
| RUN pip install -r requirements.txt | ||
| EXPOSE 8000 |
Member
There was a problem hiding this comment.
Why is there no ENTRYPOINT or CMD in here? bash in a container is not how containers should be used
Member
|
It's been a while but I added some remarks @derchrisuk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is for a basic setup to run the server instance in a Docker container.
It is using gunicorn for the WSGI server.