parent
b245c88b16
commit
a73648057e
@ -1 +1 @@ |
|||||||
.env |
*.env |
||||||
|
@ -1,14 +1,37 @@ |
|||||||
FROM golang:alpine AS builder |
# If you are wondering why the default args are set in the Dockerfile and in the |
||||||
|
# docker-compose.yml see this: https://github.com/docker/compose/issues/3608 |
||||||
|
ARG BLD_IMG=${BLD_IMG:-golang} |
||||||
|
ARG BLD_TAG=${BLD_TAG:-alpine} |
||||||
|
ARG BLD_REPO=${BLD_REPO:-https://github.com/kiwiirc/webircgateway.git} |
||||||
|
ARG BLD_VER=${BLD_VER:-master} |
||||||
|
ARG FNL_IMG=${FNL_IMG:-golang} |
||||||
|
ARG FNL_TAG=${FNL_TAG:-alpine} |
||||||
|
|
||||||
RUN apk --update add git g++ && \ |
FROM ${BLD_IMG}:${BLD_TAG} AS builder |
||||||
git clone --depth=1 --single-branch https://github.com/kiwiirc/webircgateway.git && \ |
|
||||||
cd webircgateway && \ |
|
||||||
go build |
|
||||||
|
|
||||||
FROM golang:alpine AS webircgateway |
ARG BLD_REPO |
||||||
|
ARG BLD_VER |
||||||
|
|
||||||
|
RUN apk --update add \ |
||||||
|
git \ |
||||||
|
g++ |
||||||
|
|
||||||
|
RUN git clone \ |
||||||
|
--depth 1 \ |
||||||
|
--single-branch \ |
||||||
|
--branch ${BLD_VER} \ |
||||||
|
${BLD_REPO} \ |
||||||
|
/webircgateway |
||||||
|
|
||||||
|
WORKDIR /webircgateway |
||||||
|
|
||||||
|
RUN go build |
||||||
|
|
||||||
|
|
||||||
|
FROM ${FNL_IMG}:${FNL_TAG} AS webircgateway |
||||||
|
|
||||||
COPY --from=builder /go/webircgateway/webircgateway /app/webircgateway |
COPY --from=builder /go/webircgateway/webircgateway /app/webircgateway |
||||||
|
|
||||||
WORKDIR /app |
WORKDIR /app |
||||||
|
|
||||||
CMD ["./webircgateway", "--config=config.conf"] |
ENTRYPOINT ["./webircgateway", "--config=config.conf"] |
||||||
|
Loading…
Reference in new issue