# syntax=docker/dockerfile:1

FROM golang:alpine AS build
RUN apk --no-cache add ca-certificates
RUN mkdir -p /tmp

FROM alpine:latest

RUN apk --no-cache add \
    curl \
    unzip \
    gnupg \
    lsb-release \
    nodejs \
    npm \
    openssl \
    tar \
    git

RUN npm install -g github:taskrabbit/elasticsearch-dump

COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build /tmp /tmp
COPY ./build/integration-service /
COPY ./assets/integrations /integrations

CMD [ "/integration-service" ]