forked from drk1wi/Modlishka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
22 lines (16 loc) · 635 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM golang:alpine
MAINTAINER Krzysztof Bednarczyk <[email protected]>
ENV MODLISHKA_REPOSITORY="github.com/drk1wi/Modlishka"
ENV INSTALL_PACKAGES="git make gcc musl-dev"
ENV PROJECT_DIR="${GOPATH}/src/${MODLISHKA_REPOSITORY}"
ENV MODLISHKA_BIN="/bin/proxy"
COPY ./run-server.sh /bin/run-server.sh
ADD . ${PROJECT_DIR}
RUN set -ex \
&& chmod x /bin/run-server.sh \
&& apk add --no-cache ${INSTALL_PACKAGES}\
&& cd ${PROJECT_DIR}/ && make \
&& cp ${PROJECT_DIR}/dist/proxy ${MODLISHKA_BIN} \
&& apk del ${INSTALL_PACKAGES} && rm -rf /var/cache/apk/* && rm -rf ${GOPATH}/src/*
CMD ["run-server.sh"]
EXPOSE 80 443