-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (40 loc) · 1.45 KB
/
Copy pathDockerfile
File metadata and controls
49 lines (40 loc) · 1.45 KB
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
# Dockerfile to create a Mendix Docker image based on either the source code or
# Mendix Deployment Archive (aka mda file)
#
# Author: Mendix Digital Ecosystems, digitalecosystems@mendix.com
# Version: 1.5
FROM mendix/rootfs
LABEL Author="Mendix Digital Ecosystems"
LABEL maintainer="digitalecosystems@mendix.com"
# Build-time variables
ARG BUILD_PATH=\Pipeline-main
ARG DD_API_KEY
# Checkout CF Build-pack here
RUN mkdir -p buildpack/.local && \
(wget -qO- https://github.com/mendix/cf-mendix-buildpack/archive/master.tar.gz \
| tar xvz -C buildpack --strip-components 1)
# Copy python scripts which execute the buildpack (exporting the VCAP variables)
COPY scripts/compilation /buildpack
# Add the buildpack modules
ENV PYTHONPATH "/buildpack/lib/"
# Create the build destination
RUN mkdir build cache
COPY $BUILD_PATH build
# Compile the application source code and remove temp files
WORKDIR /buildpack
RUN chmod u+x "/buildpack/compilation"
RUN "/buildpack/compilation" /build /cache && \
rm -fr /cache /tmp/javasdk /tmp/opt
# Expose nginx port
ENV PORT 80
EXPOSE $PORT
RUN mkdir -p "/.java/.userPrefs/com/mendix/core"
RUN mkdir -p "/root/.java/.userPrefs/com/mendix/core"
RUN ln -s "/.java/.userPrefs/com/mendix/core/prefs.xml" "/root/.java/.userPrefs/com/mendix/core/prefs.xml"
RUN apt-get update && apt-get install -y \
vim
# Start up application
COPY scripts/ /build
WORKDIR /build
RUN chmod u+x startup
ENTRYPOINT ["/build/startup","/buildpack/start.py"]