Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
webservices
cern-search
cern-search-rest-api
Commits
1276f5e4
Commit
1276f5e4
authored
Feb 20, 2019
by
Pablo Panero
Browse files
docker: add base docker image and its ci
parent
279a0637
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
1276f5e4
...
...
@@ -18,11 +18,28 @@ variables:
### By default, there are 6 stages that we may use:
### Feel free to adapt this to your specific case.
stages
:
-
build_base
-
build
-
tag_image
-
import_image
# This stage is only used when the built image is stored in the GitLab Registry
-
deploy
### 'Build Base' stage
### Builds the base docker image and tags it according to the commit message.
build_base_image
:
stage
:
build_base
only
:
changes
:
-
Dockerfile-base
-
Pipfile
-
Pipfile.lock
tags
:
-
docker-image-build
script
:
'
echo
"Building
base
Docker
image..."'
variables
:
DOCKER_FILE
:
Dockerfile-base
TO
:
gitlab-registry.cern.ch/webservices/cern-search/cern-search-rest-api/cern-search-rest-api-base:${CI_COMMIT_SHA}
### 'Build' stage
### Build the image and store it in the registry. It is important that this step
### doesn't override the image the applications are running, as we haven't tested the image yet
...
...
Dockerfile-base
0 → 100644
View file @
1276f5e4
# -*- coding: utf-8 -*-
# Use CentOS7:
FROM inveniosoftware/centos7-python:3.6
# Install pre-requisites
RUN yum update -y && \
yum install -y \
gcc \
openssl \
openldap-devel \
https://linuxsoft.cern.ch/cern/centos/7/cern/x86_64/Packages/CERN-CA-certs-20180516-1.el7.cern.noarch.rpm
# CERN Search installation
WORKDIR /${WORKING_DIR}/src
ADD ./Pipfile /${WORKING_DIR}/src/Pipfile
ADD ./Pipfile.lock /${WORKING_DIR}/src/Pipfile.lock
# Install dependencies globally
RUN pipenv install --system --deploy
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment