Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
docker stuff related to odate
|- Dockerfile
|- book  [with all of the html files]

In the Dockerfile:

FROM nginx:alpine
COPY book /usr/share/nginx/html

Build the docker container, which has an nginx webserver in it:

docker build -t textbook .

Run the server:

docker run  -d -p 8080:80 textbook

the '8080' is what you put in the address bar, eg: localhost:8080. The 80 is the container's port itself.

to see what containers are running,

docker ps -a

to stop the container: docker stop <id of container>

to restart docker start -ai <id of container>

to remove the image: docker rmi <image name>

So that works. But can I run from inside an ubuntu container? And... is it important?

so - get an ubuntu container. add some html. is there a way of running both a server inside it, and then also having terminal open?


but just do two containers.

-- so maybe see what the rocker/docker crowd has, start building with that. or use ryanfb's vsfm as a base...

--- what about this have R kernel in there too. So vsfm, jupyter, python, R.... and then do everything through jupyter notebooks? That might be ... cool. leave the textbook on a website... (or shit have it in a bunch of premade notebooks...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.