-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (34 loc) · 1.04 KB
/
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
39
40
FROM golang:1.14-buster
LABEL maintainer "Rafael Martins <[email protected]>"
ENV BGW_BASEDIR /data
COPY . /code
RUN set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
wget \
tar \
xz-utils \
locales-all \
&& rm -rf /var/lib/apt/lists/* \
&& BLOGC_VERSION=$(wget -q -O- https://blogc.rgm.io/ | grep '^LATEST_RELEASE=' | cut -d= -f2) \
&& wget https://github.com/blogc/blogc/releases/download/v$BLOGC_VERSION/blogc-$BLOGC_VERSION.tar.xz \
&& tar -xvf blogc-$BLOGC_VERSION.tar.xz \
&& rm blogc-$BLOGC_VERSION.tar.xz \
&& ( \
cd blogc-$BLOGC_VERSION \
&& ./configure \
--prefix /usr/local \
--enable-make \
&& make \
&& make install \
) \
&& rm -rf blogc-$BLOGC_VERSION \
&& ( \
cd /code \
&& CGO_ENABLED=0 go build -o /usr/local/bin/blogc-github-webhook \
) \
&& rm -rf /code
VOLUME /data
EXPOSE 8000
CMD ["/usr/local/bin/blogc-github-webhook"]