forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
38 lines (29 loc) · 1016 Bytes
/
Dockerfile
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
FROM golang:1.5.1
MAINTAINER Nicolas Ruflin <[email protected]>
RUN set -x && \
apt-get update && \
apt-get install -y netcat && \
apt-get clean
## Install go package dependencies
RUN set -x \
go get \
github.com/pierrre/gotestcover \
github.com/tsg/goautotest \
golang.org/x/tools/cmd/cover \
golang.org/x/tools/cmd/vet
COPY libbeat/scripts/docker-entrypoint.sh /entrypoint.sh
# Setup work environment
ENV LIBBEAT_PATH /go/src/github.com/elastic/beats/libbeat
ENV GO15VENDOREXPERIMENT=1
RUN mkdir -p $LIBBEAT_PATH/coverage
WORKDIR $LIBBEAT_PATH
RUN mkdir -p /etc/pki/tls/certs
COPY libbeat/scripts/docker/logstash/pki/tls/certs/logstash.crt /etc/pki/tls/certs/logstash.crt
# Create a copy of the respository inside the container.
COPY . /go/src/github.com/elastic/beats/
# It is expected that libbeat from the host is mounted
# within the container at the WORKDIR location.
ENTRYPOINT ["/entrypoint.sh"]
# Build libbeat inside of the container so that it is ready
# for testing.
RUN make