-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
47 lines (30 loc) · 1.32 KB
/
Dockerfile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM sapmachine:11
LABEL org.opencontainers.image.authors="Anas OUFDOU <oufdou.anas@gmail.com>"
#https://sap.github.io/spartacus-docs/installing-sap-commerce-cloud-2105/#step-1-download-unzip-and-create-the-new-recipe
ENV SPA_DOWNLOAD_URL=https://github.com/SAP/spartacus/releases/download/storefront-4.1.0/spartacussampledata.2105.zip
ENV PROJECT_FOLDER /home/hybris/hybris
ENV HYBRIS_SOURCE_DIR /hybris
ENV HYBRIS_HOME_DIR /home/hybris/hybris
ENV HYBRIS_BIN_DIR $HYBRIS_HOME_DIR/hybris/bin
ENV HYBRIS_CONFIG_DIR $HYBRIS_HOME_DIR/hybris/config
ENV HYBRIS_DATA_DIR $PROJECT_FOLDER/hybris/data
ENV HYBRIS_LOG_DIR $PROJECT_FOLDER/hybris/log
ENV HYBRIS_TEMP_DIR $HYBRIS_HOME_DIR/hybris/temp/hybris
ENV CUSTOM_FOLDER /custom
ENV PATH "/scripts:${PATH}"
RUN useradd -ms /bin/bash hybris
RUN mkdir -p $HYBRIS_HOME_DIR/hybris \
&& chown -R hybris:hybris $HYBRIS_HOME_DIR
COPY --chown=hybris:hybris prepare/custom $CUSTOM_FOLDER
COPY --chown=hybris:hybris prepare/scripts /scripts
COPY entrypoint.sh /
COPY --chown=hybris:hybris data/home/. /home/hybris
RUN ls -la $HYBRIS_HOME_DIR \
&& ls -la /home/hybris
COPY --chown=hybris:hybris data/hybris/data $HYBRIS_DATA_DIR
RUN chmod +rx scripts/* \
&& chmod +rx /entrypoint.sh
EXPOSE 9001 9002 9003 9004 8000 8983
USER hybris
WORKDIR /home/hybris
ENTRYPOINT ["/entrypoint.sh"]