diff --git a/Dockerfile b/Dockerfile index 7529c97..f58f5a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,17 @@ -FROM ubuntu:jammy +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y \ g++ \ make \ - curl \ - telnet \ - cmake \ - gdb \ + python3 \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /app/uploadedFiles - COPY . /app - WORKDIR /app +RUN make re + EXPOSE 4243 -CMD ["sh", "-c", "make re && ./webserv -l0 -c resources/webserv.conf"] \ No newline at end of file +CMD ["sh", "-c", "./webserv -l1 -c resources/webserv.conf"] \ No newline at end of file diff --git a/Makefile b/Makefile index 288eb02..9b7f92d 100644 --- a/Makefile +++ b/Makefile @@ -79,5 +79,5 @@ build_image: Dockerfile .PHONY: run_container run_container: - docker run -p 8000:8000 -p 5000:5000 -v .:/app -it webserv + docker run -d -p 4243:4243 webserv diff --git a/resources/webserv.conf b/resources/webserv.conf index d97eed3..fca717e 100644 --- a/resources/webserv.conf +++ b/resources/webserv.conf @@ -1,9 +1,11 @@ http { server { - listen 127.0.0.1:4243; - server_name 127.0.0.1:4243; + listen 0.0.0.0:4243; + server_name 0.0.0.0:4243; + root resources/mainWebsite; error_page 404 404.html; + location / { index index.html; }