This repository contains the starter code for CMU 15-441/641 Networking and the Internet Project 1: A Web Server Called Liso.
DockerFile
: Script to build the docker image for the project's environment.Makefile
: Contains rules formake
.README.md
: Current document.cp1
: CP1 scripts and examples.cp2
: CP2 scripts and examples.cp3
: CP3 scripts and examples.src/
: Source code for the project.src/echo_client.c
: Simple echo network client.src/echo_server.c
: Simple echo network serversrc/example.c
: Example driver for parsing.src/lexer.l
: Lex/Yacc related logic.src/parser.y
src/parse.c
include/parse.h
- Install docker: https://www.docker.com
- Open a terminal and navigate to the directory containing this
README.md
file. - Build the docker image:
docker build -t 15-441/641-project-1:latest -f ./DockerFile .
- Run the docker container:
docker run -it -v `pwd`:/home/project-1/ --name <name for your container> 15-441/641-project-1 /bin/bash
- The starter code for the project is available at
/home/project-1/
in the container and.
on your local machine. To make development easier, a mapping is established between these two folders. Modiying the code in one location will also effect the other one. This means that you can use an IDE to write code on your local machine and then seamlessly test it in the container. - To test your server using a web browser, you need to configure port mapping for the docker container. Simply add the argument
-p 8888:15441
to thedocker run
command to establish a mapping from127.0.0.1:15441
in the container to127.0.0.1:8888
on your local machine. Then you can test your server by using a web browser (e.g., Chrome) on your local machine to navigate to the URL127.0.0.1:8888
.