forked from matth-x/MicroOcppSimulator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 711 Bytes
/
Dockerfile
File metadata and controls
29 lines (22 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Use Alpine Linux as the base image
FROM alpine:latest
# Update package lists and install necessary dependencies
RUN apk update && \
apk add --no-cache \
git \
cmake \
openssl-dev \
build-base
# Set the working directory inside the container
WORKDIR /MicroOcppSimulator
# Copy your application files to the container's working directory
COPY . .
RUN git submodule init && git submodule update
RUN cmake -S . -B ./build
RUN cmake --build ./build -j 16 --target mo_simulator -j 16
# Grant execute permissions to the shell script
RUN chmod +x /MicroOcppSimulator/build/mo_simulator
# Expose port 8000
EXPOSE 8000
# Run the shell script inside the container
CMD ["./build/mo_simulator"]