make Binder docker-friendly again. built on python image with django 1.10

This commit is contained in:
Jeffrey Forman 2016-12-05 21:56:49 -05:00
parent 7fdcfab8a0
commit 0252c3df62
4 changed files with 15 additions and 324 deletions

View File

@ -1,23 +1,21 @@
FROM debian:jessie FROM python:2.7
MAINTAINER Jeffrey Forman <code@jeffreyforman.net> MAINTAINER Jeffrey Forman <code@jeffreyforman.net>
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update \
git \ && rm -rf /var/lib/apt/lists/*
python-pip
RUN git clone https://github.com/jforman/binder.git /opt/binder/ WORKDIR /usr/src/app
RUN pip install -r /opt/binder/requirements.txt COPY requirements.txt ./
RUN pip install -r requirements.txt
ENV PYTHONPATH $PYTHONPATH:/opt/binder COPY . .
ENV DJANGO_SETTINGS_MODULE binder.settings EXPOSE 8000
RUN ["/opt/binder/manage.py", "migrate"] RUN ["python", "manage.py", "migrate"]
RUN ["/opt/binder/manage.py", "loaddata", "/opt/binder/binder/fixtures/initial_data.json"] RUN ["python", "manage.py", "loaddata", "binder/fixtures/initial_data.json"]
EXPOSE :8000 CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
CMD ["/opt/binder/manage.py", "runserver", "0.0.0.0:8000"]

View File

@ -1,308 +1 @@
[ [{"fields": {"model": "contenttype", "app_label": "contenttypes"}, "model": "contenttypes.contenttype", "pk": 1}, {"fields": {"model": "group", "app_label": "auth"}, "model": "contenttypes.contenttype", "pk": 2}, {"fields": {"model": "user", "app_label": "auth"}, "model": "contenttypes.contenttype", "pk": 3}, {"fields": {"model": "permission", "app_label": "auth"}, "model": "contenttypes.contenttype", "pk": 4}, {"fields": {"model": "session", "app_label": "sessions"}, "model": "contenttypes.contenttype", "pk": 5}, {"fields": {"model": "logentry", "app_label": "admin"}, "model": "contenttypes.contenttype", "pk": 6}, {"fields": {"model": "bindserver", "app_label": "binder"}, "model": "contenttypes.contenttype", "pk": 7}, {"fields": {"model": "key", "app_label": "binder"}, "model": "contenttypes.contenttype", "pk": 8}, {"fields": {"codename": "add_contenttype", "name": "Can add content type", "content_type": 1}, "model": "auth.permission", "pk": 1}, {"fields": {"codename": "change_contenttype", "name": "Can change content type", "content_type": 1}, "model": "auth.permission", "pk": 2}, {"fields": {"codename": "delete_contenttype", "name": "Can delete content type", "content_type": 1}, "model": "auth.permission", "pk": 3}, {"fields": {"codename": "add_permission", "name": "Can add permission", "content_type": 4}, "model": "auth.permission", "pk": 4}, {"fields": {"codename": "change_permission", "name": "Can change permission", "content_type": 4}, "model": "auth.permission", "pk": 5}, {"fields": {"codename": "delete_permission", "name": "Can delete permission", "content_type": 4}, "model": "auth.permission", "pk": 6}, {"fields": {"codename": "add_group", "name": "Can add group", "content_type": 2}, "model": "auth.permission", "pk": 7}, {"fields": {"codename": "change_group", "name": "Can change group", "content_type": 2}, "model": "auth.permission", "pk": 8}, {"fields": {"codename": "delete_group", "name": "Can delete group", "content_type": 2}, "model": "auth.permission", "pk": 9}, {"fields": {"codename": "add_user", "name": "Can add user", "content_type": 3}, "model": "auth.permission", "pk": 10}, {"fields": {"codename": "change_user", "name": "Can change user", "content_type": 3}, "model": "auth.permission", "pk": 11}, {"fields": {"codename": "delete_user", "name": "Can delete user", "content_type": 3}, "model": "auth.permission", "pk": 12}, {"fields": {"codename": "add_session", "name": "Can add session", "content_type": 5}, "model": "auth.permission", "pk": 13}, {"fields": {"codename": "change_session", "name": "Can change session", "content_type": 5}, "model": "auth.permission", "pk": 14}, {"fields": {"codename": "delete_session", "name": "Can delete session", "content_type": 5}, "model": "auth.permission", "pk": 15}, {"fields": {"codename": "add_logentry", "name": "Can add log entry", "content_type": 6}, "model": "auth.permission", "pk": 16}, {"fields": {"codename": "change_logentry", "name": "Can change log entry", "content_type": 6}, "model": "auth.permission", "pk": 17}, {"fields": {"codename": "delete_logentry", "name": "Can delete log entry", "content_type": 6}, "model": "auth.permission", "pk": 18}, {"fields": {"codename": "add_key", "name": "Can add key", "content_type": 8}, "model": "auth.permission", "pk": 19}, {"fields": {"codename": "change_key", "name": "Can change key", "content_type": 8}, "model": "auth.permission", "pk": 20}, {"fields": {"codename": "delete_key", "name": "Can delete key", "content_type": 8}, "model": "auth.permission", "pk": 21}, {"fields": {"codename": "add_bindserver", "name": "Can add bind server", "content_type": 7}, "model": "auth.permission", "pk": 22}, {"fields": {"codename": "change_bindserver", "name": "Can change bind server", "content_type": 7}, "model": "auth.permission", "pk": 23}, {"fields": {"codename": "delete_bindserver", "name": "Can delete bind server", "content_type": 7}, "model": "auth.permission", "pk": 24}, {"fields": {"username": "admin", "first_name": "", "last_name": "", "is_active": true, "is_superuser": true, "is_staff": true, "last_login": null, "groups": [], "user_permissions": [], "password": "pbkdf2_sha256$20000$7zHgdrWNLW4j$vjAbJsyiSd3UXo7+MItoh9amW/N+tD8hls/BsXdDDnI=", "email": "admin@example.org", "date_joined": "2016-12-05T08:44:01.676"}, "model": "auth.user", "pk": 1}]
{
"fields": {
"model": "contenttype",
"name": "content type",
"app_label": "contenttypes"
},
"model": "contenttypes.contenttype",
"pk": 1
},
{
"fields": {
"model": "group",
"name": "group",
"app_label": "auth"
},
"model": "contenttypes.contenttype",
"pk": 2
},
{
"fields": {
"model": "user",
"name": "user",
"app_label": "auth"
},
"model": "contenttypes.contenttype",
"pk": 3
},
{
"fields": {
"model": "permission",
"name": "permission",
"app_label": "auth"
},
"model": "contenttypes.contenttype",
"pk": 4
},
{
"fields": {
"model": "session",
"name": "session",
"app_label": "sessions"
},
"model": "contenttypes.contenttype",
"pk": 5
},
{
"fields": {
"model": "logentry",
"name": "log entry",
"app_label": "admin"
},
"model": "contenttypes.contenttype",
"pk": 6
},
{
"fields": {
"model": "bindserver",
"name": "bind server",
"app_label": "binder"
},
"model": "contenttypes.contenttype",
"pk": 7
},
{
"fields": {
"model": "key",
"name": "key",
"app_label": "binder"
},
"model": "contenttypes.contenttype",
"pk": 8
},
{
"fields": {
"codename": "add_contenttype",
"name": "Can add content type",
"content_type": 1
},
"model": "auth.permission",
"pk": 1
},
{
"fields": {
"codename": "change_contenttype",
"name": "Can change content type",
"content_type": 1
},
"model": "auth.permission",
"pk": 2
},
{
"fields": {
"codename": "delete_contenttype",
"name": "Can delete content type",
"content_type": 1
},
"model": "auth.permission",
"pk": 3
},
{
"fields": {
"codename": "add_permission",
"name": "Can add permission",
"content_type": 4
},
"model": "auth.permission",
"pk": 4
},
{
"fields": {
"codename": "change_permission",
"name": "Can change permission",
"content_type": 4
},
"model": "auth.permission",
"pk": 5
},
{
"fields": {
"codename": "delete_permission",
"name": "Can delete permission",
"content_type": 4
},
"model": "auth.permission",
"pk": 6
},
{
"fields": {
"codename": "add_group",
"name": "Can add group",
"content_type": 2
},
"model": "auth.permission",
"pk": 7
},
{
"fields": {
"codename": "change_group",
"name": "Can change group",
"content_type": 2
},
"model": "auth.permission",
"pk": 8
},
{
"fields": {
"codename": "delete_group",
"name": "Can delete group",
"content_type": 2
},
"model": "auth.permission",
"pk": 9
},
{
"fields": {
"codename": "add_user",
"name": "Can add user",
"content_type": 3
},
"model": "auth.permission",
"pk": 10
},
{
"fields": {
"codename": "change_user",
"name": "Can change user",
"content_type": 3
},
"model": "auth.permission",
"pk": 11
},
{
"fields": {
"codename": "delete_user",
"name": "Can delete user",
"content_type": 3
},
"model": "auth.permission",
"pk": 12
},
{
"fields": {
"codename": "add_session",
"name": "Can add session",
"content_type": 5
},
"model": "auth.permission",
"pk": 13
},
{
"fields": {
"codename": "change_session",
"name": "Can change session",
"content_type": 5
},
"model": "auth.permission",
"pk": 14
},
{
"fields": {
"codename": "delete_session",
"name": "Can delete session",
"content_type": 5
},
"model": "auth.permission",
"pk": 15
},
{
"fields": {
"codename": "add_logentry",
"name": "Can add log entry",
"content_type": 6
},
"model": "auth.permission",
"pk": 16
},
{
"fields": {
"codename": "change_logentry",
"name": "Can change log entry",
"content_type": 6
},
"model": "auth.permission",
"pk": 17
},
{
"fields": {
"codename": "delete_logentry",
"name": "Can delete log entry",
"content_type": 6
},
"model": "auth.permission",
"pk": 18
},
{
"fields": {
"codename": "add_key",
"name": "Can add key",
"content_type": 8
},
"model": "auth.permission",
"pk": 19
},
{
"fields": {
"codename": "change_key",
"name": "Can change key",
"content_type": 8
},
"model": "auth.permission",
"pk": 20
},
{
"fields": {
"codename": "delete_key",
"name": "Can delete key",
"content_type": 8
},
"model": "auth.permission",
"pk": 21
},
{
"fields": {
"codename": "add_bindserver",
"name": "Can add bind server",
"content_type": 7
},
"model": "auth.permission",
"pk": 22
},
{
"fields": {
"codename": "change_bindserver",
"name": "Can change bind server",
"content_type": 7
},
"model": "auth.permission",
"pk": 23
},
{
"fields": {
"codename": "delete_bindserver",
"name": "Can delete bind server",
"content_type": 7
},
"model": "auth.permission",
"pk": 24
},
{
"fields": {
"username": "admin",
"first_name": "",
"last_name": "",
"is_active": true,
"is_superuser": true,
"is_staff": true,
"last_login": "2015-11-20T09:29:39.444",
"groups": [],
"user_permissions": [],
"password": "pbkdf2_sha256$15000$Jl6HSK3XvVE3$7qKxeiFKmEpUuHpDUuk5NlVx4V/oOVF0zHMuHdlaZu0=",
"email": "admin@admin.com",
"date_joined": "2015-11-20T09:29:39.444"
},
"model": "auth.user",
"pk": 1
}
]

View File

@ -18,7 +18,7 @@
</div> </div>
{% endif %} {% endif %}
<form method="post" action="{% url 'django.contrib.auth.views.login' %}{% if next %}?next={{ next }}{% endif %}" class="form-horizontal" > <form method="post" action="{% url 'login' %}{% if next %}?next={{ next }}{% endif %}" class="form-horizontal" >
{% csrf_token %} {% csrf_token %}
<div class="form-group"> <div class="form-group">
<label for="{{ form.username.id_for_label }}" class="control-label col-md-5">Username</label> <label for="{{ form.username.id_for_label }}" class="control-label col-md-5">Username</label>

View File

@ -1,3 +1,3 @@
Django>=1.8 Django>=1.10
dnspython>=1.11 dnspython>=1.11
pybindxml>=0.4 pybindxml>=0.4