forked from kotsis/wordpress_exporter
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (23 loc) · 683 Bytes
/
Dockerfile
File metadata and controls
34 lines (23 loc) · 683 Bytes
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
FROM golang:1.12
# Add Maintainer Info
LABEL maintainer="Erwin Mueller <erwin.mueller@deventm.com>"
# Set the Current Working Directory inside the container
WORKDIR $GOPATH/src/wordpress_exporter
# Copy sources.
COPY . .
# Download all the dependencies.
RUN go get -d -v ./...
# Install the package
RUN go install -v ./...
ENV WORDPRESS_DB_HOST="" \
WORDPRESS_DB_PORT="3306" \
WORDPRESS_DB_USER="" \
WORDPRESS_DB_PASSWORD="" \
WORDPRESS_DB_NAME="" \
WORDPRESS_TABLE_PREFIX="wp_"
EXPOSE 8888
ADD /docker-entrypoint.sh /docker-entrypoint.sh
RUN set -x \
&& chmod +x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["wordpress_exporter"]