Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
burrow
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hang Yu
burrow
Commits
130023a7
Unverified
Commit
130023a7
authored
8 years ago
by
Casey Kuhlman
Browse files
Options
Downloads
Patches
Plain Diff
significantly reduce build time of Dockerfile
parent
877665d6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+21
-12
21 additions, 12 deletions
Dockerfile
with
21 additions
and
12 deletions
Dockerfile
+
21
−
12
View file @
130023a7
...
...
@@ -8,25 +8,19 @@ EXPOSE 46656
EXPOSE
46657
#-----------------------------------------------------------------------------
# install eris-db
# install eris-db
's dependencies
# set the source code path and copy the repository in
ENV
ERIS_DB_SRC_PATH $GOPATH/src/github.com/eris-ltd/eris-db
COPY
. $ERIS_DB_SRC_PATH
ADD
glide.yaml $ERIS_DB_SRC_PATH/
ADD
glide.lock $ERIS_DB_SRC_PATH/
# [csk] if we vendor the dependencies we should import them b4 the glide install, no?
# fetch and install eris-db and its dependencies
# install glide for dependency management
# install glide for dependency management
RUN
go get github.com/Masterminds/glide
\
# install dependencies for eris-db with glide
&& cd $ERIS_DB_SRC_PATH \
&& glide install \
# build the main eris-db target
&& cd $ERIS_DB_SRC_PATH/cmd/eris-db \
&& go build \
&& cp eris-db $INSTALL_BASE/eris-db \
# copy the start script for eris-db \
&& cp $ERIS_DB_SRC_PATH/bin/start_eris_db $INSTALL_BASE/erisdb-wrapper \
&& chmod 755 $INSTALL_BASE/erisdb-wrapper
&& glide install
#-----------------------------------------------------------------------------
# install mint-client [to be deprecated]
...
...
@@ -48,6 +42,21 @@ RUN git clone --quiet https://$ERIS_DB_MINT_REPO . \
# && go build -o $INSTALL_BASE/mintgen ./mintgen \
# && go build -o $INSTALL_BASE/mintsync ./mintsync
#-----------------------------------------------------------------------------
# install eris-db
# copy in the entire repo now (after dependencies installed)
COPY
. $ERIS_DB_SRC_PATH
# build the main eris-db target
RUN
cd
$ERIS_DB_SRC_PATH
/cmd/eris-db
\
# statically link Alpine's c library to provide X-Linux buildability
# [csk] see -> https://github.com/eris-ltd/eris-pm/commit/e24c49c7ba1e62509377adacf8da650b51e84e6a
&& go build --ldflags '-extldflags "-static"' -o $INSTALL_BASE/eris-db \
# copy the start script for eris-db \
&& cp $ERIS_DB_SRC_PATH/bin/start_eris_db $INSTALL_BASE/erisdb-wrapper \
&& chmod 755 $INSTALL_BASE/erisdb-wrapper
#-----------------------------------------------------------------------------
# clean up [build container needs to be separated from shipped container]
...
...
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