Skip to content

Kehan-Zhang/Simple-Webserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A very simple webserver

All credit goes to the original author: koind/docker-simple-webserver | Github Repo

It just made sense for us to include this in our repo as standalone files as opposed to including the original repo in ours as a submodule.

Instructions from readme in original repo as below.

Simple web server in docker container

Built docker image

$ docker build -t webserver .

Run

$ docker run -d -p 8080:8080 webserver

Dockerfile

FROM debian:9.3-slim

RUN rm /bin/sh && ln -s /bin/bash /bin/sh

RUN apt-get update \
    && apt-get install -y curl

ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION 8.9.4

RUN curl --silent -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.2/install.sh | bash

RUN source ~/.bashrc && nvm install $NODE_VERSION && nvm alias default $NODE_VERSION && nvm use default

ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH

RUN node -v
RUN npm -v

RUN npm install express

COPY . /var/www/html

WORKDIR /var/www/html

EXPOSE 8080

CMD node webserver.js

About

Assignment of Cloud Computing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published