Skip to content

Commit

Permalink
Merge pull request #55 from stakater/fix-dockerfile-permission
Browse files Browse the repository at this point in the history
Fix dockerfile permission
  • Loading branch information
ahmedwaleedmalik authored Jan 21, 2021
2 parents e3c6074 + 3cb0581 commit e86d5ff
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
### Git ###
.git*

# Dependency directories
node_modules

# Optional NPM cache directory
.npm
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN mkdir -p $HOME/application
WORKDIR $HOME/application

# copy the entire application
COPY --chown=default:root . .
COPY --chown=1001:root . .

# install yarn globaly
RUN npm install -g yarn
Expand All @@ -22,6 +22,12 @@ RUN yarn install
# build the application
RUN yarn run build

# Change ownership of cache to make it writable
RUN chown -R 1001 ~/.cache

# Change permissions to fix EACCESS permission error
RUN chmod -R 755 $HOME

# set non-root user
USER 1001

Expand Down

0 comments on commit e86d5ff

Please sign in to comment.