2022-06-21 15:36:59 +02:00
|
|
|
FROM golang:1.18.3-alpine3.16 as golang
|
2018-10-22 04:13:59 +02:00
|
|
|
|
2020-02-09 18:52:25 +01:00
|
|
|
RUN apk add --no-cache curl git
|
2018-10-22 04:13:59 +02:00
|
|
|
|
|
|
|
# We need the source and task to compile the hooks
|
2020-02-09 18:52:25 +01:00
|
|
|
COPY . /semaphore/
|
2018-10-22 04:13:59 +02:00
|
|
|
|
2020-02-09 18:52:25 +01:00
|
|
|
RUN (cd /usr && curl -sL https://taskfile.dev/install.sh | sh)
|
|
|
|
WORKDIR /semaphore
|
2018-10-22 04:13:59 +02:00
|
|
|
RUN task deps:tools && task deps:be && task compile:be && task compile:api:hooks
|
|
|
|
|
2020-02-09 18:52:25 +01:00
|
|
|
FROM apiaryio/dredd:13.0.0 as dredd
|
|
|
|
|
|
|
|
RUN apk add --no-cache bash
|
|
|
|
|
|
|
|
COPY --from=golang /semaphore /semaphore
|
|
|
|
|
|
|
|
WORKDIR /semaphore
|
|
|
|
|
|
|
|
COPY deployment/docker/ci/dredd/entrypoint /usr/local/bin
|
|
|
|
|
|
|
|
ENV SEMAPHORE_SERVICE=semaphore_ci \
|
|
|
|
SEMAPHORE_PORT=3000 \
|
|
|
|
MYSQL_SERVICE=mysql \
|
|
|
|
MYSQL_PORT=3306
|
|
|
|
|
2020-02-09 16:00:50 +01:00
|
|
|
ENTRYPOINT ["/usr/local/bin/entrypoint"]
|