File tree Expand file tree Collapse file tree 3 files changed +39
-5
lines changed Expand file tree Collapse file tree 3 files changed +39
-5
lines changed Original file line number Diff line number Diff line change 1- FROM debian:bullseye-slim AS open-ocpp-simu
1+ FROM debian:bullseye-slim AS open-ocpp-simu-compile
22
33SHELL ["/bin/bash" , "-c" ]
44
Original file line number Diff line number Diff line change 1+ FROM open-ocpp-simu-compile
2+
3+ ARG simu_user=cp_simu
4+ ARG simu_group=cp_simu
5+ ARG simu_uid=1001
6+ ARG simu_gid=1001
7+
8+ USER root
9+ # Ensure user exist within container with same uid/gid
10+ RUN groupadd -g ${simu_gid} ${simu_group} && useradd -m -u ${simu_uid} -g ${simu_gid} ${simu_user}
11+ RUN mkdir -p /var/chargepoint
12+ RUN chown ${simu_uid}:${simu_gid} /var/chargepoint
13+ COPY gcc_native/config.ini /var/chargepoint/config.ini
14+ RUN chown ${simu_uid}:${simu_gid} /var/chargepoint/config.ini
15+
16+ COPY gcc_native /cp_simulator
17+
18+ USER cp_simu
19+
20+ WORKDIR "/var/chargepoint"
21+
22+ ENTRYPOINT ["/cp_simulator/chargepoint"]
Original file line number Diff line number Diff line change @@ -19,14 +19,14 @@ BUILD_TYPE?=Debug
1919DISABLE_DOCKER? =0
2020
2121
22- DOCKER_COMPILE_IMAGE =open-ocpp-compile
22+ DOCKER_COMPILE_IMAGE =open-ocpp-simu- compile
2323
2424
2525# Default target
2626default : gcc-native
2727
2828# Silent makefile
29- .SILENT :
29+ # .SILENT:
3030
3131# Install prefix
3232ifneq ($(strip $(INSTALL_PREFIX ) ) ,)
@@ -97,7 +97,19 @@ $(CLANG_NATIVE_BUILD_DIR)/Makefile:
9797
9898
9999DOCKER_BUILD =docker build --build-arg http_proxy="${http_proxy}" --build-arg https_proxy="${https_proxy}" --build-arg no_proxy="${no_proxy}" --build-arg uid=$$(id -u ) --build-arg gid=$$(id -g )
100- docker-build-images :
101- @ ${DOCKER_BUILD} -f docker/Dockerfile -t ${DOCKER_COMPILE_IMAGE} $( ROOT_DIR ) / docker
100+ DOCKER_SIMULATOR_IMAGE =open-occp-cp-simulator
101+ docker-build-images : docker-build-simu-compile docker-build-cp-simulator
102102
103+ docker-build-simu-compile :
104+ @${DOCKER_BUILD} -f docker/Dockerfile -t $(DOCKER_COMPILE_IMAGE ) $(ROOT_DIR ) /docker
105+
106+ docker-build-cp-simulator :
107+ @${DOCKER_BUILD} -f docker/Dockerfile_cp_simulator -t $(DOCKER_SIMULATOR_IMAGE ) $(ROOT_DIR ) /bin/
108+
109+
110+ run-simu :
111+ docker run $(DOCKER_INTERACTIVE ) --rm --network=host --name ocpp-simu $(DOCKER_SIMULATOR_IMAGE )
112+
113+ run-launcher :
114+ docker run $(DOCKER_INTERACTIVE ) --rm --network=host --name ocpp-launcher --entrypoint /cp_simulator/launcher $(DOCKER_SIMULATOR_IMAGE )
103115
You can’t perform that action at this time.
0 commit comments