Fix warning because of lower case 'as' instead of uppercase 'AS' in dockerfiles

This commit is contained in:
Wolfgang Huß 2024-08-29 16:19:19 +02:00
parent 77219363e9
commit 1a2c7abfe8
8 changed files with 34 additions and 34 deletions

View File

@ -1,7 +1,7 @@
################################################################################## ##################################################################################
# BASE (Is pushed to DockerHub for rebranding) ################################### # BASE (Is pushed to DockerHub for rebranding) ###################################
################################################################################## ##################################################################################
FROM node:20.12.1-alpine3.19 as base FROM node:20.12.1-alpine3.19 AS base
# ENVs # ENVs
## DOCKER_WORKDIR would be a classical ARG, but that is not multi layer persistent - shame ## DOCKER_WORKDIR would be a classical ARG, but that is not multi layer persistent - shame
@ -48,7 +48,7 @@ WORKDIR ${DOCKER_WORKDIR}
################################################################################## ##################################################################################
# DEVELOPMENT (Connected to the local environment, to reload on demand) ########## # DEVELOPMENT (Connected to the local environment, to reload on demand) ##########
################################################################################## ##################################################################################
FROM base as development FROM base AS development
# We don't need to copy or build anything since we gonna bind to the # We don't need to copy or build anything since we gonna bind to the
# local filesystem which will need a rebuild anyway # local filesystem which will need a rebuild anyway
@ -61,7 +61,7 @@ CMD /bin/sh -c "yarn install && yarn run dev"
################################################################################## ##################################################################################
# CODE (Does contain all code files and is pushed to DockerHub for rebranding) ### # CODE (Does contain all code files and is pushed to DockerHub for rebranding) ###
################################################################################## ##################################################################################
FROM base as code FROM base AS code
# copy everything, but do not build. # copy everything, but do not build.
COPY . . COPY . .
@ -69,7 +69,7 @@ COPY . .
################################################################################## ##################################################################################
# BUILD (Does contain all files and the compilate and is therefore bloated) ###### # BUILD (Does contain all files and the compilate and is therefore bloated) ######
################################################################################## ##################################################################################
FROM code as build FROM code AS build
# yarn install # yarn install
RUN yarn install --production=false --frozen-lockfile --non-interactive RUN yarn install --production=false --frozen-lockfile --non-interactive
@ -79,7 +79,7 @@ RUN /bin/sh -c "yarn run build"
################################################################################## ##################################################################################
# TEST ########################################################################### # TEST ###########################################################################
################################################################################## ##################################################################################
FROM build as test FROM build AS test
# Run command # Run command
CMD /bin/sh -c "yarn run dev" CMD /bin/sh -c "yarn run dev"
@ -87,7 +87,7 @@ CMD /bin/sh -c "yarn run dev"
################################################################################## ##################################################################################
# PRODUCTION (Does contain only "binary"- and static-files to reduce image size) # # PRODUCTION (Does contain only "binary"- and static-files to reduce image size) #
################################################################################## ##################################################################################
FROM base as production FROM base AS production
# Copy "binary"-files from build image # Copy "binary"-files from build image
COPY --from=build ${DOCKER_WORKDIR}/build ./build COPY --from=build ${DOCKER_WORKDIR}/build ./build

View File

@ -7,7 +7,7 @@ ARG APP_IMAGE_CODE=${APP_IMAGE}:${APP_IMAGE_TAG_CODE}
################################################################################## ##################################################################################
# CODE (branded) ################################################################# # CODE (branded) #################################################################
################################################################################## ##################################################################################
FROM $APP_IMAGE_CODE as code FROM $APP_IMAGE_CODE AS code
ARG CONFIGURATION=example ARG CONFIGURATION=example
@ -20,7 +20,7 @@ COPY configurations/${CONFIGURATION}/branding/email/ src/middleware/helpers/emai
################################################################################## ##################################################################################
# BUILD ########################################################################## # BUILD ##########################################################################
################################################################################## ##################################################################################
FROM code as build FROM code AS build
# yarn install # yarn install
RUN yarn install --production=false --frozen-lockfile --non-interactive RUN yarn install --production=false --frozen-lockfile --non-interactive
@ -30,7 +30,7 @@ RUN yarn run build
################################################################################## ##################################################################################
# BRANDED (Does contain only "binary"- and static-files to reduce image size) #### # BRANDED (Does contain only "binary"- and static-files to reduce image size) ####
################################################################################## ##################################################################################
FROM $APP_IMAGE_BASE as branded FROM $APP_IMAGE_BASE AS branded
# TODO - do all copying with one COPY command to have one layer # TODO - do all copying with one COPY command to have one layer
# Copy "binary"-files from build image # Copy "binary"-files from build image

View File

@ -7,7 +7,7 @@ ARG APP_IMAGE_CODE=${APP_IMAGE}:${APP_IMAGE_TAG_CODE}
################################################################################## ##################################################################################
# CODE (branded) ################################################################# # CODE (branded) #################################################################
################################################################################## ##################################################################################
FROM $APP_IMAGE_CODE as code FROM $APP_IMAGE_CODE AS code
ARG CONFIGURATION=example ARG CONFIGURATION=example
@ -25,7 +25,7 @@ RUN tools/merge-locales.sh
################################################################################## ##################################################################################
# BUILD ########################################################################## # BUILD ##########################################################################
################################################################################## ##################################################################################
FROM code as build FROM code AS build
# yarn install # yarn install
## unnicely done in $APP_IMAGE_CODE at the moment, see main repo ## unnicely done in $APP_IMAGE_CODE at the moment, see main repo
@ -36,8 +36,8 @@ RUN yarn run generate
################################################################################## ##################################################################################
# BRANDED ### TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO #### # BRANDED ### TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO ####
################################################################################## ##################################################################################
# FROM $APP_IMAGE_BASE as branded # FROM $APP_IMAGE_BASE AS branded
FROM nginx:alpine as branded FROM nginx:alpine AS branded
COPY --from=build ./app/dist/ /usr/share/nginx/html/ COPY --from=build ./app/dist/ /usr/share/nginx/html/
RUN rm /etc/nginx/conf.d/default.conf RUN rm /etc/nginx/conf.d/default.conf

View File

@ -7,7 +7,7 @@ ARG APP_IMAGE_CODE=${APP_IMAGE}:${APP_IMAGE_TAG_CODE}
################################################################################## ##################################################################################
# CODE (branded) ################################################################# # CODE (branded) #################################################################
################################################################################## ##################################################################################
FROM $APP_IMAGE_CODE as code FROM $APP_IMAGE_CODE AS code
ARG CONFIGURATION=example ARG CONFIGURATION=example
@ -28,7 +28,7 @@ RUN tools/merge-locales.sh
################################################################################## ##################################################################################
# BUILD ########################################################################## # BUILD ##########################################################################
################################################################################## ##################################################################################
FROM code as build FROM code AS build
# yarn install # yarn install
RUN yarn install --production=false --frozen-lockfile --non-interactive RUN yarn install --production=false --frozen-lockfile --non-interactive
@ -38,7 +38,7 @@ RUN yarn run build
################################################################################## ##################################################################################
# BRANDED (Does contain only "binary"- and static-files to reduce image size) #### # BRANDED (Does contain only "binary"- and static-files to reduce image size) ####
################################################################################## ##################################################################################
FROM $APP_IMAGE_BASE as branded FROM $APP_IMAGE_BASE AS branded
# TODO - do all copying with one COPY command to have one layer # TODO - do all copying with one COPY command to have one layer
# Copy "binary"-files from build image # Copy "binary"-files from build image

View File

@ -1,4 +1,4 @@
FROM node:21-alpine3.17 as base FROM node:21-alpine3.17 AS base
# ENVs (available in production aswell, can be overwritten by commandline or env file) # ENVs (available in production aswell, can be overwritten by commandline or env file)
## DOCKER_WORKDIR would be a classical ARG, but that is not multi layer persistent - shame ## DOCKER_WORKDIR would be a classical ARG, but that is not multi layer persistent - shame
@ -43,7 +43,7 @@ WORKDIR ${DOCKER_WORKDIR}
################################################################################## ##################################################################################
# DEVELOPMENT (Connected to the local environment, to reload on demand) ########## # DEVELOPMENT (Connected to the local environment, to reload on demand) ##########
################################################################################## ##################################################################################
FROM base as development FROM base AS development
# We don't need to copy or build anything since we gonna bind to the # We don't need to copy or build anything since we gonna bind to the
# local filesystem which will need a rebuild anyway # local filesystem which will need a rebuild anyway
@ -56,7 +56,7 @@ CMD /bin/sh -c "npm install && npm run dev"
################################################################################## ##################################################################################
# STORYBOOK ###################################################################### # STORYBOOK ######################################################################
################################################################################## ##################################################################################
FROM base as storybook FROM base AS storybook
# We don't need to copy or build anything since we gonna bind to the # We don't need to copy or build anything since we gonna bind to the
# local filesystem which will need a rebuild anyway # local filesystem which will need a rebuild anyway
@ -69,7 +69,7 @@ CMD /bin/sh -c "npm install && npm run storybook"
################################################################################## ##################################################################################
# DOCUMENTATION ################################################################## # DOCUMENTATION ##################################################################
################################################################################## ##################################################################################
FROM base as documentation FROM base AS documentation
# We don't need to copy or build anything since we gonna bind to the # We don't need to copy or build anything since we gonna bind to the
# local filesystem which will need a rebuild anyway # local filesystem which will need a rebuild anyway
@ -82,7 +82,7 @@ CMD /bin/sh -c "npm install && npm run docs:dev"
################################################################################## ##################################################################################
# BUILD (Does contain all files and is therefore bloated) ######################## # BUILD (Does contain all files and is therefore bloated) ########################
################################################################################## ##################################################################################
FROM base as build FROM base AS build
# Copy everything # Copy everything
COPY . . COPY . .
@ -94,7 +94,7 @@ RUN npm run build
################################################################################## ##################################################################################
# TEST ########################################################################### # TEST ###########################################################################
################################################################################## ##################################################################################
#FROM build as test #FROM build AS test
# Install Additional Software # Install Additional Software
# RUN apk add --no-cache bash jq # RUN apk add --no-cache bash jq
@ -105,7 +105,7 @@ RUN npm run build
################################################################################## ##################################################################################
# PRODUCTION (Does contain only "binary"- and static-files to reduce image size) # # PRODUCTION (Does contain only "binary"- and static-files to reduce image size) #
################################################################################## ##################################################################################
FROM base as production FROM base AS production
# Copy "binary"-files from build image # Copy "binary"-files from build image
COPY --from=build ${DOCKER_WORKDIR}/build ./build COPY --from=build ${DOCKER_WORKDIR}/build ./build

View File

@ -1,7 +1,7 @@
################################################################################## ##################################################################################
# COMMUNITY ###################################################################### # COMMUNITY ######################################################################
################################################################################## ##################################################################################
FROM amd64/neo4j:4.4-community as community FROM amd64/neo4j:4.4-community AS community
# ENVs # ENVs
## We Cannot do `$(date -u +'%Y-%m-%dT%H:%M:%SZ')` here so we use unix timestamp=0 ## We Cannot do `$(date -u +'%Y-%m-%dT%H:%M:%SZ')` here so we use unix timestamp=0
@ -36,7 +36,7 @@ RUN wget https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/downloa
################################################################################## ##################################################################################
# ENTERPRISE ##################################################################### # ENTERPRISE #####################################################################
################################################################################## ##################################################################################
FROM neo4j:4.4-enterprise as enterprise FROM neo4j:4.4-enterprise AS enterprise
# Install Additional Software # Install Additional Software
## install: wget, htop (TODO: why do we need htop?) ## install: wget, htop (TODO: why do we need htop?)

View File

@ -1,7 +1,7 @@
################################################################################## ##################################################################################
# BASE (Is pushed to DockerHub for rebranding) ################################### # BASE (Is pushed to DockerHub for rebranding) ###################################
################################################################################## ##################################################################################
FROM node:20.12.1-alpine3.19 as base FROM node:20.12.1-alpine3.19 AS base
# ENVs # ENVs
## DOCKER_WORKDIR would be a classical ARG, but that is not multi layer persistent - shame ## DOCKER_WORKDIR would be a classical ARG, but that is not multi layer persistent - shame
@ -48,7 +48,7 @@ WORKDIR ${DOCKER_WORKDIR}
################################################################################## ##################################################################################
# DEVELOPMENT (Connected to the local environment, to reload on demand) ########## # DEVELOPMENT (Connected to the local environment, to reload on demand) ##########
################################################################################## ##################################################################################
FROM base as development FROM base AS development
# We don't need to copy or build anything since we gonna bind to the # We don't need to copy or build anything since we gonna bind to the
# local filesystem which will need a rebuild anyway # local filesystem which will need a rebuild anyway
@ -61,7 +61,7 @@ CMD /bin/sh -c "yarn install && yarn run dev"
################################################################################## ##################################################################################
# CODE (Does contain all code files and is pushed to DockerHub for rebranding) ### # CODE (Does contain all code files and is pushed to DockerHub for rebranding) ###
################################################################################## ##################################################################################
FROM base as code FROM base AS code
# copy everything, but do not build. # copy everything, but do not build.
COPY . . COPY . .
@ -69,7 +69,7 @@ COPY . .
################################################################################## ##################################################################################
# BUILD (Does contain all files and the compilate and is therefore bloated) ###### # BUILD (Does contain all files and the compilate and is therefore bloated) ######
################################################################################## ##################################################################################
FROM code as build FROM code AS build
# yarn install # yarn install
RUN yarn install --production=false --frozen-lockfile --non-interactive RUN yarn install --production=false --frozen-lockfile --non-interactive
@ -79,7 +79,7 @@ RUN yarn run build
################################################################################## ##################################################################################
# TEST ########################################################################### # TEST ###########################################################################
################################################################################## ##################################################################################
FROM build as test FROM build AS test
# Run command # Run command
CMD /bin/sh -c "yarn run dev" CMD /bin/sh -c "yarn run dev"
@ -87,7 +87,7 @@ CMD /bin/sh -c "yarn run dev"
################################################################################## ##################################################################################
# PRODUCTION (Does contain only "binary"- and static-files to reduce image size) # # PRODUCTION (Does contain only "binary"- and static-files to reduce image size) #
################################################################################## ##################################################################################
FROM base as production FROM base AS production
# TODO - do all copying with one COPY command to have one layer # TODO - do all copying with one COPY command to have one layer
# Copy "binary"-files from build image # Copy "binary"-files from build image

View File

@ -50,7 +50,7 @@ CMD ["yarn", "run", "start"]
################################################################################## ##################################################################################
# CODE (Does contain all code files and is pushed to DockerHub for rebranding) ### # CODE (Does contain all code files and is pushed to DockerHub for rebranding) ###
################################################################################## ##################################################################################
FROM base as code FROM base AS code
COPY package.json yarn.lock ./ COPY package.json yarn.lock ./
# yarn install # yarn install
@ -78,7 +78,7 @@ COPY maintenance/source ./
################################################################################## ##################################################################################
# BUILD ### TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO ## # BUILD ### TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO ##
################################################################################## ##################################################################################
FROM code as build FROM code AS build
# yarn generate # yarn generate
RUN yarn run generate RUN yarn run generate
@ -86,7 +86,7 @@ RUN yarn run generate
################################################################################## ##################################################################################
# PRODUCTION ### TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO #### # PRODUCTION ### TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO # TODO ####
################################################################################## ##################################################################################
FROM nginx:alpine as production FROM nginx:alpine AS production
COPY --from=build ./app/dist/ /usr/share/nginx/html/ COPY --from=build ./app/dist/ /usr/share/nginx/html/
RUN rm /etc/nginx/conf.d/default.conf RUN rm /etc/nginx/conf.d/default.conf