diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..7bd3040 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,20 @@ +FROM golang:1.12.9-alpine3.9 + +WORKDIR /app + +RUN apk update \ + && apk add --virtual build-deps gcc git \ + && rm -rf /var/cache/apk/* + +RUN addgroup -S golang \ + && adduser -S -G golang golang + +COPY . . + +RUN go install -v ./cmd/... +RUN chown -R golang /app + +USER golang + +EXPOSE 8080 +ENTRYPOINT ["rp-archiver"] diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 0000000..683ae21 --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,10 @@ +version: "3" + +services: + indexer: + image: ${DOCKER_IMAGE_NAME:-ilhasoft/archiver}:${DOCKER_IMAGE_TAG:-latest} + build: + context: .. + dockerfile: ./docker/Dockerfile + ports: + - 8080:8000