Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
16d88a7c
Commit
16d88a7c
authored
Mar 30, 2019
by
Stephan Müller
Committed by
Nicolas Giard
Mar 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: run docker image as non-root (#795)
* do not use apk update explicitely * change user root to node
parent
cce466e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
Dockerfile
dev/build/Dockerfile
+14
-15
No files found.
dev/build/Dockerfile
View file @
16d88a7c
...
...
@@ -3,9 +3,7 @@
# ====================
FROM
node:10.15-alpine AS assets
RUN
apk update
&&
\
apk add yarn g++ make python
--no-cache
&&
\
rm
-rf
/var/cache/apk/
*
RUN
apk add yarn g++ make python
--no-cache
WORKDIR
/wiki
...
...
@@ -28,22 +26,23 @@ RUN yarn --production --frozen-lockfile --non-interactive
FROM
node:10.15-alpine
LABEL
maintainer="requarks.io"
RUN
apk update
&&
\
apk add bash curl git openssh gnupg sqlite
--no-cache
&&
\
rm
-rf
/var/cache/apk/
*
&&
\
RUN
apk add bash curl git openssh gnupg sqlite
--no-cache
&&
\
mkdir
-p
/wiki
&&
\
mkdir
-p
/logs
mkdir
-p
/logs
&&
\
chown
-R
node:node /wiki /logs
WORKDIR
/wiki
COPY
--from=assets /wiki/assets ./assets
COPY
--from=assets /wiki/node_modules ./node_modules
COPY
./server ./server
COPY
--from=assets /wiki/server/views ./server/views
COPY
./dev/build/config.yml ./config.yml
COPY
./dev/docker-common/wait.sh ./wait.sh
COPY
./package.json ./package.json
COPY
./LICENSE ./LICENSE
COPY
--chown=node:node --from=assets /wiki/assets ./assets
COPY
--chown=node:node --from=assets /wiki/node_modules ./node_modules
COPY
--chown=node:node ./server ./server
COPY
--chown=node:node --from=assets /wiki/server/views ./server/views
COPY
--chown=node:node ./dev/build/config.yml ./config.yml
COPY
--chown=node:node ./dev/docker-common/wait.sh ./wait.sh
COPY
--chown=node:node ./package.json ./package.json
COPY
--chown=node:node ./LICENSE ./LICENSE
USER
node
EXPOSE
3000
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment