forked from winery/winery
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile.noBuild
104 lines (94 loc) · 3.99 KB
/
Dockerfile.noBuild
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
FROM tomcat:9-jdk17-openjdk-buster
LABEL maintainer = "Oliver Kopp <kopp.dev@gmail.com>, Michael Wurster <miwurster@gmail.com>, Lukas Harzenetter <lharzenetter@gmx.de>"
ENV WINERY_USER_ID 1724
ENV WINERY_USER_HOME /opt/winery
ENV WINERY_REPOSITORY_URL ""
ENV WINERY_DEPENDENT_REPOSITORIES ""
ENV WINERY_HEAP_MAX 2048m
ENV WINERY_JMX_ENABLED ""
ENV CONTAINER_HOSTNAME localhost
ENV CONTAINER_PORT 1337
ENV WORKFLOWMODELER_HOSTNAME localhost
ENV WORKFLOWMODELER_PORT 8080
ENV TOPOLOGYMODELER_HOSTNAME localhost
ENV TOPOLOGYMODELER_PORT 8080
ENV WINERY_REPOSITORY_PROVIDER "file"
ENV WINERY_REPOSITORY_PATH "/var/repository"
ENV WINERY_CSAR_OUTPUT_PATH "/var/repository/csars"
ENV WINERY_TENANT_MODE false
ENV WINERY_HOSTNAME localhost
ENV WINERY_PORT 8080
ENV EDMM_TRANSFORMATION_HOSTNAME localhost
ENV EDMM_TRANSFORMATION_PORT 5000
ENV TOPS_HOSTNAME localhost
ENV TOPS_PORT 9090
ENV DNA_HOSTNAME localhost
ENV DNA_PORT 8050
ENV DNA_CONTEXT deploymentNormalizationAssistant
ENV WINERY_FEATURE_ACCOUNTABILITY false
ENV WINERY_FEATURE_TEST_COMPLETION false
ENV WINERY_FEATURE_TEST_COMPLIANCE false
ENV WINERY_FEATURE_FREEZE_DEFROST false
ENV WINERY_FEATURE_MANAGEMENT_ENRICHMENT false
ENV WINERY_FEATURE_NFV false
ENV WINERY_FEATURE_PATTERN_REFINEMENT false
ENV WINERY_FEATURE_PROBLEM_DETECTION false
ENV WINERY_FEATURE_RADON false
ENV WINERY_FEATURE_SPLITTING false
ENV WINERY_FEATURE_TEST_REFINEMENT false
ENV WINERY_FEATURE_EDMM_MODELING false
ENV WINERY_FEATURE_UPDATE_TEMPLATES false
ENV WINERY_FEATURE_LIVE_MODELING false
ENV WINERY_FEATURE_PROPERTY_CHECK false
ENV WINERY_FEATURE_RESEARCH_OBJECT false
ENV WINERY_FEATURE_LICENSE_ENGINE false
ENV LICENSE_ENGINE_HOSTNAME localhost
ENV LICENSE_ENGINE_PORT 7000
ENV DOCKERIZE_VERSION v0.6.1
ENV CHE_URL "che.localhost"
ENV CHE_URL_PROTOCOL "http"
ENV GITHUB_CLIENT_ID ""
ENV GITHUB_CLIENT_SECRET ""
ENV DARUS_HOSTNAME "demodarus.izus.uni-stuttgart.de"
ENV DARUS_API_TOKEN ""
ENV DARUS_DATAVERSE "spielwiese"
RUN rm /dev/random && ln -s /dev/urandom /dev/random \
&& curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \
&& apt-get update -qq && apt-get install -qqy --no-install-recommends \
git \
git-lfs \
sudo \
&& apt-get clean \
&& curl -LJOS https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& rm -rf ${CATALINA_HOME}/webapps/* \
&& sed -ie "s/securerandom.source=file:\/dev\/random/securerandom.source=file:\/dev\/.\/urandom/g" $JAVA_HOME/conf/security/java.security \
&& git config --global core.fscache true \
&& git lfs install \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
COPY winery.war ${CATALINA_HOME}/webapps/winery.war
COPY tosca-management.war ${CATALINA_HOME}/webapps/ROOT.war
COPY topologymodeler.war ${CATALINA_HOME}/webapps/winery-topologymodeler.war
COPY workflowmodeler.war ${CATALINA_HOME}/webapps/winery-workflowmodeler.war
# create Winery user and home dir
RUN mkdir ${WINERY_USER_HOME} \
&& groupadd -g ${WINERY_USER_ID} winery \
&& useradd -s /bin/nologin -u ${WINERY_USER_ID} -g winery -d ${WINERY_USER_HOME} --system winery \
&& chmod a+rwx ${WINERY_USER_HOME} \
&& chown winery: ${WINERY_USER_HOME} \
&& echo "winery:winery" | chpasswd \
&& usermod -aG sudo winery
# create repository dir and change ownership
RUN mkdir ${WINERY_REPOSITORY_PATH} \
&& chmod a+rwx ${WINERY_REPOSITORY_PATH} \
&& chown winery: ${WINERY_REPOSITORY_PATH}
# workaround because catalina has to be able to write files in the catalina_home dir
RUN chmod -R a+w ${CATALINA_HOME}
COPY --chown=winery:winery docker/winery.yml.tpl ${WINERY_USER_HOME}/winery.yml.tpl
COPY --chown=winery:winery docker/docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
USER winery
WORKDIR ${WINERY_USER_HOME}
EXPOSE 8080
CMD ["/docker-entrypoint.sh"]