-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.development
52 lines (39 loc) · 1.8 KB
/
Dockerfile.development
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM golang:1.11-stretch AS stack-builder
ARG STACK_GIT_REPO=github.com/stack/stack
ARG STACK_GIT_BRANCH=master
ARG STACK_BUILD_MODE=development
RUN set -eux && \
apt-get update && \
apt-get install -y git curl
RUN git clone --depth=1 --branch $STACK_GIT_BRANCH -c advice.detachedHead=false https://$STACK_GIT_REPO ./src/$STACK_GIT_REPO/ && \
go get -u -v -ldflags "-X $STACK_GIT_REPO/pkg/config.BuildMode=$STACK_BUILD_MODE \
-X $STACK_GIT_REPO/pkg/config.Version=$STACK_GIT_BRANCH \
-X $STACK_GIT_REPO/pkg/config.BuildTime=$(date '+%Y%m%d%H%M%S')" \
./src/$STACK_GIT_REPO/
ARG MAILHOG_SRC_URL=https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64
ARG MAILHOG_SRC_SHA256=ba921e04438e176c474d533447ae64707ffcdd1230f0153f86cb188d348f25c0
RUN set -eux && \
curl -fsSL "$MAILHOG_SRC_URL" -o MailHog && \
echo "$MAILHOG_SRC_SHA256 MailHog" | sha256sum -c - && \
chmod +x MailHog
FROM node:10-stretch
COPY --from=stack-builder /go/bin/* /MailHog /usr/local/bin/
COPY ./*.sh /usr/local/bin/
COPY ./config.yaml /etc/stack/
RUN set -eux && \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y ca-certificates curl git vim nmap tree mlocate gosu && \
gosu nobody true && \
echo "deb https://apache.bintray.com/couchdb-deb stretch main" > /etc/apt/sources.list.d/couchdb && \
curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc | apt-key add - && \
apt-get update && \
apt-get install -y couchdb && \
apt-get install -y -t stretch-backports redis-server && \
apt-get clean && \
rm -rf /tmp/* /var/tmp && \
chmod +x /usr/local/bin/*
WORKDIR /var/lib/stack
EXPOSE 8080 6060 8025 5984 6379
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["stack","serve"]