Skip to content

Commit def27d7

Browse files
authored
Merge pull request #146 from mendix/DES-3866_upgrade-cf-buildpack
DES-3866 Upgrade to CF Buildpack v4.28.4. Upgrade to NGINX 1.20.
2 parents 029f524 + 44a5795 commit def27d7

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ FROM ${BUILDER_ROOTFS_IMAGE} AS builder
1313
ARG BUILD_PATH=project
1414
ARG DD_API_KEY
1515
# CF buildpack version
16-
ARG CF_BUILDPACK=v4.24.0
16+
ARG CF_BUILDPACK=v4.28.4
1717
# CF buildpack download URL
1818
ARG CF_BUILDPACK_URL=https://github.com/mendix/cf-mendix-buildpack/releases/download/${CF_BUILDPACK}/cf-mendix-buildpack.zip
1919

@@ -67,10 +67,10 @@ ENV NGINX_CUSTOM_BIN_PATH=/usr/sbin/nginx
6767
# 6. Create symlink for java prefs used by CF buildpack
6868
# 7. Update ownership of /opt/mendix so that the app can run as a non-root user
6969
# 8. Update permissions of /opt/mendix so that the app can run as a non-root user
70-
RUN mkdir -p /tmp/buildcache /var/mendix/build /var/mendix/build/.local &&\
70+
RUN mkdir -p /tmp/buildcache /tmp/cf-deps /var/mendix/build /var/mendix/build/.local &&\
7171
chmod +rx /opt/mendix/buildpack/compilation /opt/mendix/buildpack/git /opt/mendix/buildpack/buildpack/stage.py &&\
7272
cd /opt/mendix/buildpack &&\
73-
./compilation /opt/mendix/build /tmp/buildcache &&\
73+
./compilation /opt/mendix/build /tmp/buildcache /tmp/cf-deps 0 &&\
7474
rm -fr /tmp/buildcache /tmp/javasdk /tmp/opt /tmp/downloads /opt/mendix/buildpack/compilation /opt/mendix/buildpack/git &&\
7575
ln -s /opt/mendix/.java /opt/mendix/build &&\
7676
chown -R ${USER_UID}:0 /opt/mendix /var/mendix &&\

Dockerfile.rootfs.ubi8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ENV LC_ALL C.UTF-8
1212
# install dependencies & remove package lists
1313
# doesn't include libpq5 python3-distutils libgdiplus
1414
RUN microdnf update -y && \
15-
microdnf module enable nginx:1.18 -y && \
15+
microdnf module enable nginx:1.20 -y && \
1616
microdnf install -y wget curl glibc-langpack-en python3 openssl tar gzip unzip nginx nginx-mod-stream binutils fontconfig && \
1717
microdnf clean all && rm -rf /var/cache/yum
1818

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![Test status](https://github.com/mendix/docker-mendix-buildpack/workflows/Test/badge.svg)
44

5-
The Mendix Buildpack for Docker (aka docker-mendix-buildpack) provides a standard way to build and run your Mendix Application in a [Docker](https://www.docker.com/) container.
5+
The Mendix Buildpack for Docker (aka docker-mendix-buildpack) is an example project you can use to build and run your Mendix Application in a [Docker](https://www.docker.com/) container.
66

77
## Try a sample mendix application
88

@@ -57,7 +57,7 @@ For build you can provide next arguments:
5757
- **BUILD_PATH** indicates where the application model is located. It is a root directory of an unzipped .MDA or .MPK file. In the latter case, this is the directory where your .MPR file is located. Must be within [build context](https://docs.docker.com/engine/reference/commandline/build/#extended-description). Defaults to `./project`.
5858
- **ROOTFS_IMAGE** is a type of rootfs image. Defaults to `mendix/rootfs:ubi8` (Red Hat Universal Base Image 8). To use Ubuntu 18.04, change this to `mendix/rootfs:bionic`. It's also possible to use a custom rootfs image as described in [Advanced feature: full-build](#advanced-feature-full-build).
5959
- **BUILDER_ROOTFS_IMAGE** is a type of rootfs image used for downloading the Mendix app dependencies and compiling the Mendix app from source. Defaults to `mendix/rootfs:bionic`. It's also possible to use a custom rootfs image as described in [Advanced feature: full-build](#advanced-feature-full-build).
60-
- **CF_BUILDPACK** is a version of CloudFoundry buildpack. Defaults to `v4.24.0`. For stable pipelines, it's recommended to use a fixed version from **v4.24.0** and later. CloudFoundry buildpack versions below **v4.24.0** are not supported.
60+
- **CF_BUILDPACK** is a version of CloudFoundry buildpack. Defaults to `v4.28.4`. For stable pipelines, it's recommended to use a fixed version from **v4.28.4** and later. CloudFoundry buildpack versions below **v4.28.4** are not supported.
6161
- **EXCLUDE_LOGFILTER** will exclude the `mendix-logfilter` binary from the resulting Docker image if set to `true`. Defaults to `true`. Excluding `mendix-logfilter` will reduce the image size and remove a component that's not commonly used; the `LOG_RATELIMIT` environment variable option will be disabled.
6262
- **UNINSTALL_BUILD_DEPENDENCIES** will uninstall packages which are not needed to launch an app, and are only used during the build phase. Defaults to `true`. This option will remove several libraries which are known to have unpatched CVE vulnerabilities.
6363
- **CF_BUILDPACK_URL** specifies the URL where the CF buildpack should be downloaded from (for example, a local mirror). Defaults to `https://github.com/mendix/cf-mendix-buildpack/releases/download/${CF_BUILDPACK}/cf-mendix-buildpack.zip`. Specifying **CF_BUILDPACK_URL** will override the version from **CF_BUILDPACK**.
@@ -188,8 +188,6 @@ environment:
188188
MIIGejCCBGKgAwIBAgIJANuKwREDEb4sM....
189189
```
190190

191-
Requested a test scenario from Jouke and Xiwen, meanwhile will update docker-buildpack documentation.
192-
193191
### Configuring Custom Runtime Settings
194192

195193
To configure any of the advanced [Custom Runtime Settings](https://world.mendix.com/display/refguide6/Custom+Settings) you can use setting name prefixed with `MXRUNTIME_` as an environment variable.

cf-buildpack.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v4.24.0
1+
v4.28.4

docker-buildpack.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v3.5.0
1+
v3.5.1

scripts/compilation

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ from buildpack.stage import DOT_LOCAL_LOCATION
1212

1313
BUILD_PATH = sys.argv[1]
1414
CACHE_PATH = sys.argv[2]
15+
DEPS_DIR = sys.argv[3]
16+
DEPS_IDX = sys.argv[4]
1517

1618
logging.basicConfig(
1719
level=logging.INFO,
@@ -35,7 +37,7 @@ def export_vcap_services():
3537

3638
def call_buildpack_compilation():
3739
logging.debug("Executing call_buildpack_compilation...")
38-
return subprocess.check_call(["/opt/mendix/buildpack/buildpack/stage.py", BUILD_PATH, CACHE_PATH])
40+
return subprocess.check_call(["/opt/mendix/buildpack/buildpack/stage.py", BUILD_PATH, CACHE_PATH, DEPS_DIR, DEPS_IDX])
3941

4042
def fix_logfilter():
4143
exclude_logfilter = os.getenv("EXCLUDE_LOGFILTER", "true").lower() == "true"

0 commit comments

Comments
 (0)