Closed lsetiawan closed 7 years ago
Thanks, I will give it a try tomorrow.
Ultimately this will be a non-interactive image, where someone could do:
docker run -d -p 8000:8000 -v /your/local/folder/for/sqlite/database:/srv/your/image/folder/for/sqlite/database/db/ image_name
and then open the browser at localhost 8000
@ocefpaf Thanks for the input. I will try to develop this some more.
I'm trying this out on a fresh Ubuntu 16.04 installation. At the moment it is failing on database creation of a Django table django_admin_log I'm clearing the table and trying again.
I'm getting this same problem https://github.com/miguelcleon/ODM2-Admin/issues/97#issuecomment-277282571 looks like the dockerfile should add the conda-forge channel:
conda config --add channels conda-forge --force
conda create -n ENVNAME python=2.7 --file requirements.txt --file requirements-dev.txt
or you can do all in one command with:
conda create -n ENVNAME python=2.7 --file requirements.txt --file requirements-dev.txt -c conda-forge
@ocefpaf > docker run -d -p 8000:8000 -v /your/local/folder/for/sqlite/database:/srv/your/image/folder/for/sqlite/database/db/ image_name
Why is sqlite referenced? @lsetiawan is installing postgresql and starting the sample db. I would think this would start the django webserver on localhost:8000 using the sample db.
@lsetiawan on the suggestion of @emiliom I thought I'd ping you about the feedback I left here about the dockfile.
Here's the progress I have so far: https://github.com/miguelcleon/ODM2-Admin/issues/107
I am closing this one and will open a new one with an updated Dockerfile.
@ocefpaf @miguelcleon I don't have much experience creating Dockerfile, this is what I have so far, it basically just creates the image then goes into the shell.