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
849506da
Commit
849506da
authored
6 years ago
by
Chevdor
Committed by
Gav Wood
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add docker file for Substrate (#930)
parent
e321a645
Branches
gh-readonly-queue/master/pr-5443-38fce08896ee595cb8572923bd0d9f40570e7cb6
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
substrate/.dockerignore
+2
-0
2 additions, 0 deletions
substrate/.dockerignore
substrate/Dockerfile
+38
-0
38 additions, 0 deletions
substrate/Dockerfile
with
40 additions
and
0 deletions
substrate/.dockerignore
0 → 100644
+
2
−
0
View file @
849506da
doc
target
This diff is collapsed.
Click to expand it.
substrate/Dockerfile
0 → 100644
+
38
−
0
View file @
849506da
FROM
phusion/baseimage:0.10.1
as
builder
LABEL
maintainer "chevdor@gmail.com"
LABEL
description="This is the build stage for Substrate. Here we create the binary."
ARG
PROFILE=release
WORKDIR
/substrate
COPY
. /substrate
RUN
apt-get update
&&
\
apt-get upgrade
-y
&&
\
apt-get
install
-y
cmake pkg-config libssl-dev git
RUN
curl https://sh.rustup.rs
-sSf
| sh
-s
--
-y
&&
\
export
PATH
=
$PATH
:
$HOME
/.cargo/bin
&&
\
cargo build
--
$PROFILE
# ===== SECOND STAGE ======
FROM
phusion/baseimage:0.10.0
LABEL
maintainer "chevdor@gmail.com"
LABEL
description="This is the 2nd stage: a very small image where we copy the Substrate binary."
ARG
PROFILE=release
COPY
--from=builder /substrate/target/$PROFILE/substrate /usr/local/bin
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/Substrate
&&
\
ln
-s
/root/.local/share/Substrate /data
RUN
rm
-rf
/usr/bin /usr/sbin
EXPOSE
30333 9933 9944
VOLUME
["/data"]
CMD
["/usr/local/bin/substrate"]
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