Skip to content

Commit

Permalink
Make Docker config fast and secure
Browse files Browse the repository at this point in the history
  • Loading branch information
fadihanna123 committed Jun 29, 2024
1 parent b1b5629 commit 6f0f1d9
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ README.md

# Docker
Dockerfile
.dockerignore

# License
LICENSE

# Vscode
.vscode
.vscode
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
README.md
README.md
.dockerignore
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM node:20.14.0-alpine3.20
FROM node:20.15.0-alpine3.20
RUN adduser -D -g '' fadi
WORKDIR /app
COPY package.json .
RUN npm i --ignore-scripts -g rimraf
RUN yarn --ignore-scripts
COPY yarn.lock package.json .
RUN npm i --silent --ignore-scripts -g rimraf
RUN yarn --silent --ignore-scripts
COPY . .
USER fadi
EXPOSE 3000
CMD yarn dev
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"husky": "^9.0.11",
"prettier": "^3.3.2",
"typescript": "^5.4.5",
"typescript-eslint": "^7.12.0",
"vite": "^5.2.12"
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2162,6 +2162,11 @@ prelude-ls@^1.2.1:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==

prettier@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.2.tgz#03ff86dc7c835f2d2559ee76876a3914cec4a90a"
integrity sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==

prop-types@^15.8.1:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
Expand Down

0 comments on commit 6f0f1d9

Please sign in to comment.