docker: move comments to avoid "empty continuation lines"
License: MIT Signed-off-by: Lars Gierth <larsg@systemli.org>
Lars Gierth committed
Oct 20, 2017 at 16:22 UTC
87408886b2677ec687284d6b1e5ce9839ee7397c
2 files changed
+9
-11
Dockerfile
+4
-5
@@ -12,24 +12,23 @@ ENV SRC_DIR /go/src/github.com/ipfs/go-ipfs
12
COPY . $SRC_DIR
13
14
# Build the thing.
15
+# Also: fix getting HEAD commit hash via git rev-parse.
16
+# Also: allow using a custom IPFS API endpoint.
17
RUN cd $SRC_DIR \
16
- # Required for getting the HEAD commit hash via git rev-parse.
18
&& mkdir .git/objects \
18
- # Allows using a custom (i.e. local) IPFS API endpoint.
19
&& ([ -z "$GX_IPFS" ] || echo $GX_IPFS > /root/.ipfs/api) \
20
- # Build the thing.
20
&& make build
21
22
+# Get su-exec, a very minimal tool for dropping privileges,
23
+# and tini, a very minimal init daemon for containers
24
ENV SUEXEC_VERSION v0.2
25
ENV TINI_VERSION v0.16.1
26
RUN set -x \
26
- # Get su-exec, a very minimal tool for dropping privileges
27
&& cd /tmp \
28
&& git clone https://github.com/ncopa/su-exec.git \
29
&& cd su-exec \
30
&& git checkout -q $SUEXEC_VERSION \
31
&& make \
32
- # Get tini, a very minimal init daemon for containers
32
&& cd /tmp \
33
&& wget -q -O tini https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini \
34
&& chmod +x tini
Dockerfile.fast
+5
-6
@@ -11,37 +11,36 @@ ENV SRC_DIR /go/src/github.com/ipfs/go-ipfs
11
12
COPY ./package.json $SRC_DIR/package.json
13
14
+# Fetch dependencies.
15
+# Also: allow using a custom IPFS API endpoint.
16
RUN set -x \
17
&& go get github.com/whyrusleeping/gx \
18
&& go get github.com/whyrusleeping/gx-go \
17
- # Allows using a custom (i.e. local) IPFS API endpoint.
19
&& ([ -z "$GX_IPFS" ] || echo $GX_IPFS > /root/.ipfs/api) \
19
- # Fetch the dependencies so we don't have to do it everytime.
20
&& cd $SRC_DIR \
21
&& gx install
22
23
COPY . $SRC_DIR
24
25
# Build the thing.
26
+# Also: fix getting HEAD commit hash via git rev-parse.
27
RUN set -x \
28
&& cd $SRC_DIR \
28
- # Required for getting the HEAD commit hash via git rev-parse.
29
&& mkdir .git/objects \
30
- # Build the thing.
30
&& make build \
31
&& mv cmd/ipfs/ipfs /usr/local/bin/ipfs \
32
&& mv bin/container_daemon /usr/local/bin/start_ipfs
33
34
+# Get su-exec, a very minimal tool for dropping privileges,
35
+# and tini, a very minimal init daemon for containers
36
ENV SUEXEC_VERSION v0.2
37
ENV TINI_VERSION v0.16.1
38
RUN set -x \
38
- # Get su-exec, a very minimal tool for dropping privileges
39
&& cd /tmp \
40
&& git clone https://github.com/ncopa/su-exec.git \
41
&& cd su-exec \
42
&& git checkout -q $SUEXEC_VERSION \
43
&& make \
44
- # Get tini, a very minimal init daemon for containers
44
&& cd /tmp \
45
&& wget -q -O tini https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini \
46
&& chmod +x tini \