Modified dockerfile
This commit is contained in:
parent
0d89ce5e2d
commit
5a8d51fc92
2 changed files with 29 additions and 4 deletions
13
.dockerignore
Normal file
13
.dockerignore
Normal 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
|
||||
20
dockerfile
20
dockerfile
|
|
@ -3,12 +3,24 @@ FROM ubuntu:20.04
|
|||
ENV APPLICATION_BINARY="Application"
|
||||
ENV OPEN_PORT=8080
|
||||
|
||||
COPY ${APPLICATION_BINARY} .
|
||||
|
||||
RUN apt-get update && \
|
||||
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/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN mkdir build && cd build && \
|
||||
cmake .. && \
|
||||
make
|
||||
|
||||
EXPOSE ${OPEN_PORT}
|
||||
CMD [ "/${APPLICATION_BINARY}" ]
|
||||
|
||||
CMD ["./build/Application"]
|
||||
|
|
|
|||
Reference in a new issue