Modified dockerfile

This commit is contained in:
rawalcher 2024-12-29 19:06:43 +01:00
parent 0d89ce5e2d
commit 5a8d51fc92
2 changed files with 29 additions and 4 deletions

13
.dockerignore Normal file
View file

@ -0,0 +1,13 @@
# Ignore build files
build/
cmake-build-*
# Ignore editor-specific files
*.swp
*.log
.idea/
.vscode/
# Ignore version control directories
.git/
.gitignore

View file

@ -3,12 +3,24 @@ FROM ubuntu:20.04
ENV APPLICATION_BINARY="Application" ENV APPLICATION_BINARY="Application"
ENV OPEN_PORT=8080 ENV OPEN_PORT=8080
COPY ${APPLICATION_BINARY} .
RUN apt-get update && \ RUN apt-get update && \
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \ ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libboost-all-dev && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
cmake \
libboost-all-dev \
git \
libsqlite3-dev && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . .
RUN mkdir build && cd build && \
cmake .. && \
make
EXPOSE ${OPEN_PORT} EXPOSE ${OPEN_PORT}
CMD [ "/${APPLICATION_BINARY}" ]
CMD ["./build/Application"]