Skip to content

Docker - #6

Open
chriamue wants to merge 10 commits into
briancappello:masterfrom
chriamue:docker
Open

Docker#6
chriamue wants to merge 10 commits into
briancappello:masterfrom
chriamue:docker

Conversation

@chriamue

Copy link
Copy Markdown
Contributor

Hi, on hub.docker.com it's possible to build github tags.
Latest tagged version has a versionconflict with py-meta-utils.
Is current master ready to get a new version tag?
Here is a dockerfile, mainly from your flask-unchained-react-spa project.
I would like to work on a kubernetes configuration file next.
Is kubernetes on your TODO.md list or is aws, gcp something else?

Comment thread Dockerfile

RUN apk add --no-cache linux-headers make gcc musl-dev libxml2-dev libxslt-dev libffi-dev postgresql-dev git

RUN pip install --upgrade pip && pip install --no-cache-dir -e git+https://github.com/briancappello/flask-unchained.git@${VERSION}#egg=flask-unchained

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I just released a new version, 0.7.0, which I think we want to use here instead of pulling from git?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Ah woops, I didn't read closely enough. I think this is fine :)

@briancappello

Copy link
Copy Markdown
Owner

Nice, this looks good! I haven't had a chance to test it yet, hopefully tonight. Assuming it works I'm happy to merge. I haven't put any effort into this docker stuffs in probably a year, so some of this is starting to get old (eg PostgreSQL is at 11.1 these days). If you're feeling up to it, might be good to try to get that upgraded (probably you have to change the version of Alpine we're building atop)

@briancappello

Copy link
Copy Markdown
Owner

@chriamue Started playing around with this. Just to clarify if I'm understanding how this is supposed to work, what I've been trying is this command from the flask-unchained directory:

docker build -t briancappello/flask-unchained .

Followed by this command from the project-under-development:

docker run -d --name PROJECT -p 5000:5000 -v "$(pwd)":/flask/src briancappello/flask-unchained

And this seems to work, at least if no bundles are installed :) I think the problem is, and I'm not sure what the best way to fix it would be, but I think somehow the container needs to get built with the requirements listed for the project-under-development.

Does that make sense? Or perhaps I'm just mis-understanding how this is supposed to be used :)

@chriamue

chriamue commented Feb 2, 2019

Copy link
Copy Markdown
Contributor Author

I think that should be used as an intermediate container like it is with node.

FROM flask-unchained
USER root
COPY .requirements.txt requirements.txt
RUN pip install -r requirements.txt
COPY requirements-dev.txt requirements-dev.txt
RUN pip install -r requirements-dev.txt
USER flask
COPY  --chown=flask . /flask/src/

@briancappello

Copy link
Copy Markdown
Owner

@chriamue I accidentally made a commit to this brach that didn't belong; feel free to force-push if you need to.

@briancappello
briancappello force-pushed the master branch 14 times, most recently from 0fb0eb3 to 13350fd Compare September 28, 2019 06:27
@briancappello
briancappello force-pushed the master branch 11 times, most recently from ef3c90a to c1823ca Compare September 28, 2019 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants