A CodeGeek specific base image for the RitDye 2017 WordPress theme project app_build container.
370
This image is created for CodeGeek-specific internal applications. It's to be used by the RitDye (2017) WordPress theme project in order to 'lock in' the node build packages used in this older projects. The image supports both amd64 and arm64 platforms.
{
"name": "app_build",
"image": "codegeekdev/ritdye-app_build",
"version": "latest",
"platform": ""
},
$ proj reinit
$ proj rebuild
$ proj build
$ proj pull -mpU prod
# PHP required by BrightBrightGreat's grunt-php Grunt helper
# So we're starting with a PHP image and adding nodejs
ARG IMAGE=php
ARG VERSION=7.4-cli
FROM ${IMAGE}:${VERSION}
ENV PATH="/node_modules/.bin:$PATH"
RUN apt-get update && \
apt-get install -yq git ca-certificates gnupg curl zip
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
curl -fsSL https://deb.nodesource.com/setup_14.x | bash - && \
apt-get update && \
apt-get install -yq nodejs
WORKDIR /app
# Keep THIS Dockerfile recipe in the image so we can reference this in the future.
COPY Dockerfile /
RUN mkdir /node_modules && \
ln -s /node_modules .
RUN npm init --yes
RUN npm install --save-dev \
autoprefixer@^9 \
cssnano@^4 \
grunt@^1.0.0 \
grunt-contrib-clean@^1.* \
grunt-contrib-compress@* \
grunt-contrib-uglify-es@https://github.com/gruntjs/grunt-contrib-uglify.git#harmony \
grunt-contrib-watch@* \
grunt-eslint@* \
grunt-modernizr@* \
grunt-notify@* \
grunt-postcss@* \
grunt-sass@* \
grunt-sass-globbing@* \
grunt-svgmin@^6.0.1\
load-grunt-config@* \
load-grunt-tasks@* \
node-sass@* \
postcss-fixes@^2.0.1 \
postscribe@^2.0.8 \
video.js@^7.5.4
RUN npm install --save-prod \
growl@^1.10.3 \
grunt-contrib-sass@^1.0.0
# Backup our package*.json files. When the container starts, the local theme folder will be
# mounted to /app, thereby overriding these files. In your entrypoint.sh, be sure to move them
# back.
RUN cp package*.json /node_modules
# Nice to have alias.
RUN echo "alias ll='ls -al'" >> ~/.bashrc
Recipe for building this image and pushing it to the Docker Hub repo.
$ mkdir build-dir
$ cd build-dir
$ vi Dockerfile
$ docker buildx ls
NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS
cg-builder * docker-container
cg-builder0 desktop-linux stopped linux/arm64*, linux/amd64*
$ docker buildx use cg-builder
Otherwise, create a new builder instance:
$ docker buildx create --name cg-builder --bootstrap --use --platform linux/arm64,linux/amd64
$ docker login -u codegeekdev
$ password: xxxxxxxx
$ docker buildx build --no-cache --push --platform linux/amd64,linux/arm64 --tag codegeekdev/ritdye-app_build:1.0.0 --tag codegeekdev/ritdye-app_build:latest -f Dockerfile .
$ docker pull codegeekdev/ritdye-app_build:latest
$ docker run -it codegeekdev/ritdye-app_build:latest /bin/bash
$ more /Dockerfile
Content type
Image
Digest
sha256:766a34ae7…
Size
319.8 MB
Last updated
almost 3 years ago
docker pull codegeekdev/ritdye-app_build