Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

difference between building a docker from ubuntu base image and python base image?

Docker newbie here.

I was reading the documentation on how to setup Django webapp using Docker and I realized that the dockerfile uses

FROM python:2.7

Can I still use the same dockerfile contents but change it to

FROM ubuntu:14.04

and make it work with python 2.7 or 3.4 for Django 1.8.1?

like image 876
Kim Stacks Avatar asked May 11 '15 03:05

Kim Stacks


1 Answers

With ubuntu you can run a django app. you just have to install the dependencies for it (with instructions in your Dockerfile for example).

In your Dockerfile, add something like :

RUN apt-get install python
RUN apt-get install django

You may also have to replace some commands by their equivalent if they're not implemented in the new base image (replace apt-get by pacman if you use archlinux instead of ubuntu for example).

But if you use django, you also can install and use pip.

like image 81
vmonteco Avatar answered Sep 23 '22 05:09

vmonteco