You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
860 B
37 lines
860 B
# 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}
|
|
|
|
FROM ${BLD_IMG}:${BLD_TAG} AS builder
|
|
|
|
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 /webircgateway/webircgateway /app/webircgateway
|
|
|
|
WORKDIR /app
|
|
|
|
ENTRYPOINT ["./webircgateway", "--config=config.conf"]
|
|
|