Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
1054a531
Commit
1054a531
authored
5 years ago
by
Federico Gimenez
Committed by
Gavin Wood
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
non-root user for running node in Dockerfile (#369)
parent
481ded55
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
polkadot/docker/Dockerfile
+8
-6
8 additions, 6 deletions
polkadot/docker/Dockerfile
with
8 additions
and
6 deletions
polkadot/docker/Dockerfile
+
8
−
6
View file @
1054a531
FROM
phusion/baseimage:0.10.
1
as
builder
FROM
phusion/baseimage:0.10.
2
as
builder
LABEL
maintainer "chevdor@gmail.com"
LABEL
description="This is the build stage for Polkadot. Here we create the binary."
...
...
@@ -17,7 +17,7 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
# ===== SECOND STAGE ======
FROM
phusion/baseimage:0.10.
0
FROM
phusion/baseimage:0.10.
2
LABEL
maintainer "chevdor@gmail.com"
LABEL
description="This is the 2nd stage: a very small image where we copy the Polkadot binary."
ARG
PROFILE=release
...
...
@@ -27,11 +27,13 @@ RUN mv /usr/share/ca* /tmp && \
rm
-rf
/usr/share/
*
&&
\
mv
/tmp/ca-certificates /usr/share/
&&
\
rm
-rf
/usr/lib/python
*
&&
\
mkdir
-p
/root/.local/share/polkadot
&&
\
ln
-s
/root/.local/share/polkadot /data
RUN
rm
-rf
/usr/bin /usr/sbin
rm
-rf
/usr/bin /usr/sbin
&&
\
useradd
-m
-u
1000
-U
-s
/bin/sh
-d
/polkadot polkadot
&&
\
mkdir
-p
/polkadot/.local/share/polkadot
&&
\
chown
-R
polkadot:polkadot /polkadot/.local
&&
\
ln
-s
/polkadot/.local/share/polkadot /data
USER
polkadot
EXPOSE
30333 9933 9944
VOLUME
["/data"]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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