Skip to content

Commit

Permalink
ci: upgrade the docker file node to 18
Browse files Browse the repository at this point in the history
KK-1017
  • Loading branch information
nikomakela committed Sep 28, 2023
1 parent bbdf508 commit 17ebfdd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
13 changes: 4 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ===============================================
FROM registry.access.redhat.com/ubi8/nodejs-14 as appbase
FROM registry.access.redhat.com/ubi9/nodejs-18 as appbase
# ===============================================
# install yarn
USER root
Expand All @@ -25,7 +25,7 @@ ENV YARN_VERSION 1.19.1
RUN yarn policies set-version $YARN_VERSION

# Copy package.json and package-lock.json/yarn.lock files
COPY --chown=default:root package*.json *yarn* ./
COPY --chown=root:root package*.json *yarn* ./

# Install npm depepndencies
ENV PATH /app/node_modules/.bin:$PATH
Expand All @@ -41,12 +41,10 @@ ARG NODE_ENV=development
ENV NODE_ENV $NODE_ENV

# copy in our source code last, as it changes the most
COPY --chown=default:root . .
# Use non-root user
USER default
COPY --chown=nginx:root . .

# Bake package.json start command into the image
CMD ["react-scripts", "start"]
CMD ["yarn", "start"]

# ===================================
FROM appbase as staticbuilder
Expand All @@ -69,9 +67,6 @@ RUN yarn build
FROM nginx:1.17 as production
# =============================

# Use non-root user
USER default

# Nginx runs with user "nginx" by default
COPY --from=staticbuilder --chown=nginx:nginx /app/build /usr/share/nginx/html

Expand Down
8 changes: 5 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ services:
container_name: kukkuu-ui
build:
context: .
target: ${DOCKER_TARGET:-development}
target: ${DOCKER_TARGET:-development} # select the docker container from dockerFile
environment:
NODE_ENV: development # which node env the build uses. NOTE: Usually same as the ${DOCKER_TARGET}.
volumes:
- '.:/app'
- '/app/node_modules'
ports:
- '3000:3000'

- '3000:3000' # for development mode
- '8080:8080' # for production mode
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
},
"dependencies": {
"@apollo/client": "^3.7.16",
"@faker-js/faker": "^8.1.0",
"@ffmpeg-installer/ffmpeg": "^1.1.0",
"@jonkoops/matomo-tracker-react": "^0.7.0",
"@reduxjs/toolkit": "^1.9.5",
Expand Down Expand Up @@ -111,7 +112,6 @@
"ansi-regex": "^5.0.1"
},
"devDependencies": {
"@faker-js/faker": "^8.0.2",
"@testing-library/jest-dom": "^6.1.3",
"@types/testing-library__jest-dom": "^6.0.0",
"codecov": "^3.8.3",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2231,10 +2231,10 @@
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.49.0.tgz#86f79756004a97fa4df866835093f1df3d03c333"
integrity sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w==

"@faker-js/faker@^8.0.2":
version "8.0.2"
resolved "https://registry.yarnpkg.com/@faker-js/faker/-/faker-8.0.2.tgz#bab698c5d3da9c52744e966e0e3eedb6c8b05c37"
integrity sha512-Uo3pGspElQW91PCvKSIAXoEgAUlRnH29sX2/p89kg7sP1m2PzCufHINd0FhTXQf6DYGiUlVncdSPa2F9wxed2A==
"@faker-js/faker@^8.1.0":
version "8.1.0"
resolved "https://registry.yarnpkg.com/@faker-js/faker/-/faker-8.1.0.tgz#e14896f1c57af2495e341dc4c7bf04125c8aeafd"
integrity sha512-38DT60rumHfBYynif3lmtxMqMqmsOQIxQgEuPZxCk2yUYN0eqWpTACgxi0VpidvsJB8CRxCpvP7B3anK85FjtQ==

"@ffmpeg-installer/darwin-arm64@4.1.5":
version "4.1.5"
Expand Down

0 comments on commit 17ebfdd

Please sign in to comment.