Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Dockerfiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Picasoft
Technique
Dockerfiles
Commits
c6d84cd0
Verified
Commit
c6d84cd0
authored
4 years ago
by
Quentin Duchemin
Browse files
Options
Downloads
Patches
Plain Diff
[CodiMD] Use global ARG in Dockerfile
parent
5125ca5b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pica-codimd/Dockerfile
+8
-7
8 additions, 7 deletions
pica-codimd/Dockerfile
with
8 additions
and
7 deletions
pica-codimd/Dockerfile
+
8
−
7
View file @
c6d84cd0
FROM
node:10.22.1-alpine3.11
as
BUILD
ENV
VERSION=2.2.0
ENV
PORTCHECKER_VERSION=v1.0.6
ARG
VERSION=2.2.0
ARG
PORTCHECKER_VERSION=v1.0.6
FROM
node:10.22.1-alpine3.11
as
BUILD
ARG
VERSION
RUN
apk add
--no-cache
--virtual
.gyp libressl-dev git bash python make
&&
\
wget https://github.com/hackmdio/codimd/archive/
$VERSION
.tar.gz
&&
\
wget https://github.com/hackmdio/codimd/archive/
$
{
VERSION
}
.tar.gz
&&
\
tar
xzf
$VERSION
.tar.gz
-C
/opt
&&
\
mv
/opt/codimd-
$VERSION
/opt/codimd
...
...
@@ -18,14 +18,15 @@ RUN cd /opt/codimd && npm install && \
config.json.example README.md CONTRIBUTING.md AUTHORS node_modules
FROM
node:10.22.1-alpine3.11
ARG
PORTCHECKER_VERSION
RUN
addgroup
--gid
5010 codimd
&&
\
adduser
-u
5010
-G
codimd
-D
codimd
&&
\
mkdir
/home/
$USER_NAME
/.npm
&&
\
echo
"prefix=/home/codimd/.npm/"
>
/home/
$USER_NAME
/.npmrc
&&
\
mkdir
-p
/home/codimd/app
&&
\
chown
-R
codimd:codimd /home/codimd
&&
\
apk add
--no-cache
git bash python
&&
\
# Git needed so NPM can clone packages and Python for node-gyp
apk add --no-cache bash git python && \
wget https://github.com/hackmdio/portchecker/releases/download/${PORTCHECKER_VERSION}/portchecker-linux-amd64.tar.gz && \
tar xvf portchecker-linux-amd64.tar.gz -C /usr/local/bin && \
mv /usr/local/bin/portchecker-linux-amd64 /usr/local/bin/pcheck && \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment