-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathDockerfile
35 lines (26 loc) · 1.11 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
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
# Set default docker_context.
ARG resource_path=target
# Set default user information
ARG GROUPNAME=Alfresco
ARG IMAGEUSERNAME=alfresco
# Set default environment args
ARG TOMCAT_DIR=/usr/local/tomcat
USER root
# Copy api-explorer war
COPY ${resource_path}/war ${TOMCAT_DIR}/webapps/
# Copy in the share-services amp
COPY ${resource_path}/amps/* ${TOMCAT_DIR}/amps/
# Install amps on alfresco.war
RUN java -jar ${TOMCAT_DIR}/alfresco-mmt/alfresco-mmt*.jar install \
${TOMCAT_DIR}/amps \
${TOMCAT_DIR}/webapps/alfresco -directory -nobackup
# The standard configuration is to have all Tomcat files owned by root with group GROUPNAME and whilst owner has read/write privileges,
# group only has restricted permissions and world has no permissions.
RUN chgrp -R ${GROUPNAME} ${TOMCAT_DIR}/webapps ${TOMCAT_DIR}/amps ${TOMCAT_DIR}/lib && \
find ${TOMCAT_DIR}/webapps -type d -exec chmod 0750 {} \; && \
find ${TOMCAT_DIR}/webapps -type f -exec chmod 0640 {} \; && \
chmod -R g+r ${TOMCAT_DIR}/webapps && \
chmod 664 ${TOMCAT_DIR}/amps/*
USER ${IMAGEUSERNAME}