-
Notifications
You must be signed in to change notification settings - Fork 35
/
Dockerfile
47 lines (39 loc) · 1.38 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
41
42
43
44
45
46
47
FROM ubuntu:16.04 as compy-builder
MAINTAINER Barna Csorogi <[email protected]>
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
curl \
g++ \
git \
libjpeg8-dev
RUN mkdir -p /usr/local/ && \
curl -O https://storage.googleapis.com/golang/go1.9.linux-amd64.tar.gz && \
tar xf go1.9.linux-amd64.tar.gz -C /usr/local
RUN mkdir -p /root/go/src/github.com/barnacs/compy/
COPY . /root/go/src/github.com/barnacs/compy/
WORKDIR /root/go/src/github.com/barnacs/compy
RUN /usr/local/go/bin/go get -d -v ./...
RUN /usr/local/go/bin/go build -v
FROM ubuntu:16.04
MAINTAINER Barna Csorogi <[email protected]>
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
libjpeg8 \
openssl \
ssl-cert && \
DEBIAN_FRONTEND=noninteractive apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt/compy
COPY \
--from=compy-builder \
/root/go/src/github.com/barnacs/compy/compy \
/root/go/src/github.com/barnacs/compy/docker.sh \
/opt/compy/
# TODO: configure HTTP BASIC authentication
# TODO: user-provided certificates
ENV \
CERTIFICATE_DOMAIN="localhost"
EXPOSE 9999
ENTRYPOINT ["./docker.sh"]