-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vlad Volkov
committed
Dec 17, 2021
1 parent
f71f2d9
commit cddcace
Showing
6 changed files
with
3,326 additions
and
1,112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ WORKDIR /usr/local/src | |
COPY app . | ||
RUN yarn | ||
|
||
FROM summerwind/actions-runner-dind:v2.284.0-ubuntu-20.04 | ||
FROM summerwind/actions-runner-dind:v2.285.1-ubuntu-20.04 AS default | ||
LABEL org.opencontainers.image.authors="BN Enginseers <[email protected]>" \ | ||
org.opencontainers.image.url="https://github.com/bn-digital/docker" \ | ||
org.opencontainers.image.source="https://github.com/bn-digital/docker" \ | ||
|
@@ -38,6 +38,7 @@ RUN apt-get update --fix-missing \ | |
&& rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/* /requirements.apt \ | ||
&& yarn global add \ | ||
@bn-digital/vault-env \ | ||
@sentry/cli \ | ||
concurrently \ | ||
eslint \ | ||
less \ | ||
|
@@ -54,9 +55,9 @@ WORKDIR /runner | |
ONBUILD WORKDIR /usr/local/src | ||
|
||
FROM dcr.bndigital.dev/library/nodejs:1.0.1 AS cms | ||
COPY ./packages/cms . | ||
ENTRYPOINT ["yarn"] | ||
CMD ["strapi", "start"] | ||
ONBUILD COPY --chown=node ./packages/cms . | ||
|
||
FROM dcr.bndigital.dev/library/nodejs:1.0.1 AS website | ||
COPY ./packages/website/build . | ||
ONBUILD COPY --chown=node ./packages/website/build . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,10 @@ | ||
# syntax docker/dockerfile:latest | ||
ARG unit_version=1.25.0 | ||
ARG nodejs_version=16.13.0 | ||
ARG unit_version=1.26.0 | ||
ARG nodejs_version=16.13.1 | ||
ARG php_version=8.0 | ||
FROM node:${nodejs_version}-slim AS nodejs-base | ||
|
||
FROM nodejs-base AS nodejs-build | ||
LABEL maintainer="NGINX Docker Maintainers <[email protected]>" | ||
RUN set -ex \ | ||
&& apt-get update \ | ||
&& apt-get install --no-install-recommends --no-install-suggests -y ca-certificates mercurial build-essential libssl-dev libpcre2-dev \ | ||
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \ | ||
&& hg clone https://hg.nginx.org/unit \ | ||
&& cd unit \ | ||
&& hg up 1.25.0 \ | ||
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \ | ||
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \ | ||
&& CC_OPT="$(DEB_BUILD_MAINT_OPTIONS="hardening=+all,-pie" DEB_CFLAGS_MAINT_APPEND="-Wp,-D_FORTIFY_SOURCE=2 -fPIC" dpkg-buildflags --get CFLAGS)" \ | ||
&& LD_OPT="$(DEB_BUILD_MAINT_OPTIONS="hardening=+all,-pie" DEB_LDFLAGS_MAINT_APPEND="-Wl,--as-needed -pie" dpkg-buildflags --get LDFLAGS)" \ | ||
&& CONFIGURE_ARGS="--prefix=/usr \ | ||
--state=/var/lib/unit \ | ||
--control=unix:/var/run/control.unit.sock \ | ||
--pid=/var/run/unit.pid \ | ||
--log=/var/log/unit.log \ | ||
--tmp=/var/tmp \ | ||
--user=unit \ | ||
--group=unit \ | ||
--openssl \ | ||
--libdir=/usr/lib/$DEB_HOST_MULTIARCH" \ | ||
&& ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/debug-modules --debug \ | ||
&& make -j $NCPU unitd \ | ||
&& install -pm755 build/unitd /usr/sbin/unitd-debug \ | ||
&& make clean \ | ||
&& ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --ld-opt="$LD_OPT" --modules=/usr/lib/unit/modules \ | ||
&& make -j $NCPU unitd \ | ||
&& install -pm755 build/unitd /usr/sbin/unitd \ | ||
&& make clean \ | ||
&& ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/debug-modules --debug \ | ||
&& ./configure nodejs --node-gyp=/usr/local/lib/node_modules/npm/bin/node-gyp-bin/node-gyp \ | ||
&& make -j $NCPU node node-install libunit-install \ | ||
&& make clean \ | ||
&& ./configure $CONFIGURE_ARGS --cc-opt="$CC_OPT" --modules=/usr/lib/unit/modules \ | ||
&& ./configure nodejs --node-gyp=/usr/local/lib/node_modules/npm/bin/node-gyp-bin/node-gyp \ | ||
&& make -j $NCPU node node-install libunit-install \ | ||
&& ldd /usr/sbin/unitd | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq > /requirements.apt | ||
|
||
|
||
|
||
FROM nginx/unit:${unit_version}-node15 AS nodejs-nginx | ||
FROM nginx/unit:${unit_version}-node16 AS nodejs-nginx | ||
RUN apt-get update \ | ||
&& apt-get upgrade --yes \ | ||
&& apt-get dist-upgrade --yes \ | ||
|
@@ -62,7 +20,6 @@ ENV PORT=5000 | |
ENV NODE_ENV=production | ||
COPY docker-entrypoint.d/nodejs.json /docker-entrypoint.d/unit.json | ||
|
||
|
||
FROM nodejs-base AS nodejs | ||
LABEL org.opencontainers.image.authors="BN Enginseers" \ | ||
org.opencontainers.image.url="https://github.com/bn-digital/docker" \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.