Updated dockerfile

This commit is contained in:
Dmitriy Shishkov 2021-04-10 10:32:55 +05:00
parent bc6ff5fc55
commit 9fa0ff195f
No known key found for this signature in database
GPG Key ID: 7CAE12ED13853CAC
2 changed files with 19 additions and 6 deletions

View File

@ -1,11 +1,17 @@
FROM ubuntu:18.04
FROM heroku/heroku:20-build as builder
WORKDIR /app
COPY . /app
COPY . .
RUN apt update -y && apt install make clang -y
RUN make
RUN make
FROM heroku/heroku:20
CMD ["./build/server", "$PORT"]
WORKDIR /srv
COPY --from=builder /app .
RUN echo 5000
CMD ["./build/server", "5000"]

View File

@ -1 +1,8 @@
Webserver in c. !Experimental!
Webserver in c. !Experimental!
Deployment:
Docker and Heroku deployment are supported. To do Heroku deployment use https://github.com/heroku/heroku-buildpack-c buildpack. For Docker just build container image and run it exposing port:
docker build -t c-dmitriy.icu .
docker run -dp 5000:5000 c-dmitriy.icu