Django inside Docker

46 views
Skip to first unread message

Davi Diório Mendes

unread,
Jun 3, 2016, 5:14:55 PM6/3/16
to Django users
Hi everyone,

I was developing with django localy, in my laptop, and my manager asked to project run inside a docker.

I did and now django can't find my templates :(

I appreciate any help, my Dockerfile is attached.

BR.
Dockerfile

Larry Martell

unread,
Jun 3, 2016, 5:29:36 PM6/3/16
to django...@googlegroups.com
You could try posting on the docker forum: https://forums.docker.com

Ezequiel Bertti

unread,
Jun 3, 2016, 6:35:28 PM6/3/16
to django...@googlegroups.com
Why didn't you use image from official django.


FROM django:onbuild




--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4eb16ab5-21d0-4c69-abdf-96f614cee3f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Akhil Lawrence

unread,
Jun 4, 2016, 2:44:25 PM6/4/16
to Django users
No where in the dockerfile you are copying your project files or mounting external file system.. Are you doing those at runtime with the help of docker compose or fig?
If yes paste those code snippets also.. 

Davi Diório Mendes

unread,
Jun 6, 2016, 12:16:19 PM6/6/16
to Django users
Hi, sorry the late response

Ezequiel, this docker will run on an IBM PowerPC and there is no base image ready to ppc64 architecture.
Soon this dockerfile will be ported to ppc64.

Akhil, I use this snippet to run the image
docker run -d --name ltc-client \
        -v $(PROJ_HOME)/client:/home/client \
        ddiorio/ltc-client:latest

Davi Diório Mendes

unread,
Jun 6, 2016, 12:28:15 PM6/6/16
to Django users
Ezequiel helped me at hangouts.

at settings.py I had:
TEMPLATES: [
    {
        [...]
        'DIRS': ['templates']
        [...]
    },
]

and as Ezequiel said, is better to use:
        'DIRS': [os.path.join(BASE_DIR, 'templates')]

now everything is working,

Thank you Ezequiel, and everyone that helped me here.
Reply all
Reply to author
Forward
0 new messages