Commit 14723cef authored by tobinski's avatar tobinski
Browse files

Initial commit

parents
Pipeline #6177 failed with stages
in 46 seconds
image: docker:19
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
before_script:
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
stages:
- build
- publish
# push to container repo
push:
stage: build
script:
- docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --pull -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
# push latest on branch master
push-latest:
stage: publish
variables:
# we don't need git
GIT_STRATEGY: none
script:
# reuse previously pushed image
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:latest
only:
- master
# push tagged images
push-tag:
stage: publish
variables:
GIT_STRATEGY: none
script:
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
only:
- tags
ARG elasticsearch_version
FROM docker.elastic.co/elasticsearch/elasticsearch:${elasticsearch_version}
RUN bin/elasticsearch-plugin install --batch repository-s3
# Elasticsearch
This is a custom elasticsearch image with the elastic image as a base and the s3 repository plugin for snapshots. This image follows the best practice of [elastic.co](https://github.com/elastic/helm-charts/blob/master/elasticsearch/README.md#how-to-install-plugins).
## Build
```bash
docker build --build-arg elasticsearch_version=7
```
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment