Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Cozy Stack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
Factory
LLLE_Project
Cozy Stack
Commits
5756b6ed
Unverified
Commit
5756b6ed
authored
Jan 28, 2019
by
aeris
Committed by
GitHub
Jan 28, 2019
Browse files
Options
Downloads
Patches
Plain Diff
Avoid useless layers during build (#1741)
parent
ce1b751d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/Dockerfile
+9
-14
9 additions, 14 deletions
scripts/Dockerfile
with
9 additions
and
14 deletions
scripts/Dockerfile
+
9
−
14
View file @
5756b6ed
...
...
@@ -8,31 +8,27 @@ FROM golang:1.11 as build
WORKDIR
/go/src/github.com/cozy/cozy-stack
# MailHog
ENV
MAILHOG_VERSION 1.0.0
ENV
MAILHOG_SRC_URL https://github.com/mailhog/MailHog/releases/download/v$MAILHOG_VERSION/MailHog_linux_amd64
ENV
MAILHOG_SRC_SHA256 ba921e04438e176c474d533447ae64707ffcdd1230f0153f86cb188d348f25c0
ENV
MAILHOG_SRC_URL=https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64 \
MAILHOG_SRC_SHA256=ba921e04438e176c474d533447ae64707ffcdd1230f0153f86cb188d348f25c0
RUN
set
-eu
;
curl
-fsSL
"
$MAILHOG_SRC_URL
"
-o
MailHog
\
&&
echo
"
$MAILHOG_SRC_SHA256
MailHog"
|
sha256sum
-c
-
\
&&
chmod
+x MailHog
# Build cozy-stack
COPY
. .
RUN
go get
-d
-v
./...
RUN
./scripts/build.sh dev
RUN
go get
-d
-v
./...
&&
./scripts/build.sh dev
# Multi-stage image: the main image
FROM
debian:stretch-slim
# cozy-stack
ENV
COZY_STACK_HOST cozy.tools
ENV
COZY_STACK_PORT 8080
ENV
COZY_STACK_PATH cozy-stack
# CouchDB
ENV
COUCHDB_VERSION 2.3.0
ENV
COUCHDB_SRC_URL https://dist.apache.org/repos/dist/release/couchdb/source/$COUCHDB_VERSION/apache-couchdb-$COUCHDB_VERSION.tar.gz
ENV
COUCHDB_SRC_SHA256 0b3868d042b158d9fd2f504804abd93cd22681c033952f832ce846672c31f352
ENV
COZY_STACK_HOST=cozy.tools \
COZY_STACK_PORT=8080 \
COZY_STACK_PATH=cozy-stack \
COUCHDB_SRC_URL=https://dist.apache.org/repos/dist/release/couchdb/source/2.3.0/apache-couchdb-2.3.0.tar.gz \
COUCHDB_SRC_SHA256=0b3868d042b158d9fd2f504804abd93cd22681c033952f832ce846672c31f352 \
PATH="$PATH:/usr/local/couchdb/bin"
ARG
DEBIAN_FRONTEND=noninteractive
...
...
@@ -75,7 +71,6 @@ RUN set -eux; apt-get update \
&& apt-get autoremove -y && apt-get clean \
&& mkdir -p /data/cozy-app && mkdir -p /data/cozy-storage
ENV
PATH $PATH:/usr/local/couchdb/bin
COPY
--from=build \
/go/src/github.com/cozy/cozy-stack/cozy-stack \
...
...
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