This is a node12 image with the build tools for the Viasat Intelie project preinstalled
454
This image is created for CodeGeek-specific internal applications. It's to be used by cg_theme_v1 projects in order to 'lock in' the node build packages used in these older projects. The image supports both amd64 and arm64 platforms.
{
"name": "app_build",
"image": "codegeekdev/intelie-app_build-node12",
"version": "latest",
"platform": ""
},
This is a custom image built specifically for the Viasat Intelie project. The repo for this project should be current with this image. Otherwise, just perform a normal reinitialization.
$ proj reinit
$ proj rebuild
$ proj build
$ proj pull -pU prod
ARG IMAGE=node
ARG VERSION=14
FROM ${IMAGE}:${VERSION}
WORKDIR /app
ENV PATH="/node_modules/.bin:$PATH"
# Keep THIS Dockerfile recipe in the image so we can reference this in the future.
COPY Dockerfile /
# Install our node modules.
# We'll save the modified package[*].json files to the /node_modules folder.
# When the container mounts to the /app folder, we'll lose these
# local copies. In your entrypoint.sh, copy them back.
RUN mkdir /node_modules && \
ln -s /node_modules . && \
npm init --yes && \
npm install --save-dev \
@babel/core@^7.13.8 \
@babel/preset-env@^7.13.8 \
@babel/register@^7.13.8 \
@wordpress/eslint-plugin@^8.0.2 \
autoprefixer@^10.2.4 \
babel-eslint@^10.1.0 \
babel-loader@^8.2.2 \
browser-sync@^2.26.14 \
del@^6.0.0 \
eslint@^7.2.0 \
eslint-config-airbnb-base@^14.2.1 \
eslint-config-prettier@^8.1.0 \
eslint-plugin-import@^2.22.1 \
eslint-plugin-jsx-a11y@^6.4.1 \
eslint-plugin-prettier@^3.3.1 \
eslint-plugin-react@^7.22.0 \
gulp@^4.0.2 \
gulp-clean-css@^4.3.0 \
gulp-if@^3.0.0 \
gulp-imagemin@^7.1.0 \
gulp-postcss@^5.1.10 \
gulp-sass@^4.1.0 \
gulp-sourcemaps@^3.0.0 \
gulp-zip@^5.0.2 \
postcss@^8.2.6 \
prettier@^2.2.1 \
vinyl-named@^1.1.0 \
webpack-stream@^6.1.2 \
yargs@^16.2.0
cp package*.json /node_modules
# Nice to have alias.
RUN echo "alias ll='ls -al'" >> ~/.bashrc
Note: The Dockerfile above will create a package.json file that will 'lock in' specific package versions. Your project will inherit this package.json file in your running container each time you rebuild your project. If you need to install additional packages for your project, do not edit the package.json file (in your project's root folder). Instead, install additional packages from within your /cg_config/docker/app_build/Dockerfile. For example, add a 'npm install' command in your Dockerfile, like this:
ARG IMAGE=check-proj-config-file-for-image
ARG VERSION=check-proj-config-file-for-version
FROM ${IMAGE}:${VERSION}
ARG NAME
WORKDIR /app
ENV PROJECTNAME=${NAME}
# If you have any additional packages to install, do so here.
# We'll save the modified package[*].json files to the node_modules folder.
# When the container mounts to the /app folder, we'll lose these
# local copies. In our entrypoint.sh, we'll copy them back.
RUN npm install --save-dev @wordpress/a11y@^3.4.1 && \
cp package*.json /node_modules
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/intelie-app_build-node12:1.0.0 --tag codegeekdev/intelie-app_build-node12:latest -f Dockerfile .
$ docker buildx rm cg-builder
$ docker pull codegeekdev/intelie-app_build-node12:latest
$ docker run -it codegeekdev/intelie-app_build-node12 /bin/bash
$ more /Dockerfile
Content type
Image
Digest
sha256:2a148dd1d…
Size
440 MB
Last updated
over 2 years ago
docker pull codegeekdev/intelie-app_build-node12