Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ESAP DB
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASTRON SDC
ESCAPE WP5
ESAP DB
Commits
555711fe
Commit
555711fe
authored
3 years ago
by
Pierre Chanial
Browse files
Options
Downloads
Patches
Plain Diff
Reduce image size.
parent
5ccff3d3
No related branches found
No related tags found
1 merge request
!8
Resolve "Reduce esap-db image size"
Pipeline
#15391
passed
3 years ago
Stage: build
Stage: test
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+4
-2
4 additions, 2 deletions
.gitlab-ci.yml
Dockerfile
+6
-5
6 additions, 5 deletions
Dockerfile
host-files/docker-compose.yml
+1
-1
1 addition, 1 deletion
host-files/docker-compose.yml
with
11 additions
and
8 deletions
.gitlab-ci.yml
+
4
−
2
View file @
555711fe
...
...
@@ -15,7 +15,7 @@ variables:
DBPROJECT_USER
:
postgres
DBPROJECT_PASSWORD
:
postgres
DOMAIN
:
localhost
ESAP_DB_IMAGE
:
${CI_REGISTRY_IMAGE}
:latest
ESAP_DB_IMAGE
:
${CI_REGISTRY_IMAGE}
before_script
:
-
docker version
...
...
@@ -36,7 +36,9 @@ build:
-
docker-compose -f host-files/docker-compose.yml config > host-files/docker-stack.yml
-
docker-compose -f host-files/docker-stack.yml build
-
echo ${CI_JOB_TOKEN} | docker login -u "${CI_REGISTRY_USER}" --password-stdin "${CI_REGISTRY}"
-
docker push ${ESAP_DB_IMAGE}
-
docker tag ${ESAP_DB_IMAGE}:latest ${ESAP_DB_IMAGE}:${CI_COMMIT_BRANCH}-${CI_COMMIT_SHORT_SHA}
-
docker push ${ESAP_DB_IMAGE}:latest
-
docker push ${ESAP_DB_IMAGE}:${CI_COMMIT_BRANCH}-${CI_COMMIT_SHORT_SHA}
test-functional
:
stage
:
test
...
...
This diff is collapsed.
Click to expand it.
Dockerfile
+
6
−
5
View file @
555711fe
# Pull base image
FROM
python:3.9
FROM
python:3.9
-slim
# Set environment varibles
ENV
PYTHONDONTWRITEBYTECODE 1
...
...
@@ -8,10 +8,11 @@ ENV PYTHONUNBUFFERED 1
WORKDIR
/code/
# Install Poetry
RUN
curl
-sSL
https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py |
POETRY_HOME
=
/opt/poetry python
&&
\
cd
/usr/local/bin
&&
\
ln
-s
/opt/poetry/bin/poetry
&&
\
poetry config virtualenvs.create
false
RUN
apt-get update
&&
apt-get
install
-y
curl libpq-dev gcc
RUN
curl
-sSL
https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py |
POETRY_HOME
=
/opt/poetry python
\
&&
cd
/usr/local/bin
\
&&
ln
-s
/opt/poetry/bin/poetry
\
&&
poetry config virtualenvs.create
false
# Copy poetry.lock* in case it doesn't exist in the repo
COPY
./pyproject.toml ./poetry.lock* /code/
...
...
This diff is collapsed.
Click to expand it.
host-files/docker-compose.yml
+
1
−
1
View file @
555711fe
...
...
@@ -3,7 +3,7 @@ version: "3"
services
:
esap-db
:
image
:
${ESAP_DB_IMAGE:-esap-db:latest
}
image
:
${ESAP_DB_IMAGE:-esap-db
}
:latest
container_name
:
esap-db
stdin_open
:
true
# docker run -i
tty
:
true
# docker run -t
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment