Split python-base into its own Dockerfile
There's no real need to tie these together into a multi-stage Dockerfile as they don't really share anything. Split them. Change-Id: Ifd7ccadcd8048eeb57797d60356aec2f9f0d2c80 Depends-On: https://review.openstack.org/641805
This commit is contained in:
parent
a5f3c1cffe
commit
9adc5ce8fe
34
.zuul.yaml
34
.zuul.yaml
@ -214,11 +214,7 @@
|
||||
vars: &python-builder_vars
|
||||
docker_images:
|
||||
- context: docker/python-builder
|
||||
target: python-builder
|
||||
repository: opendevorg/python-builder
|
||||
- context: docker/python-builder
|
||||
target: python-base
|
||||
repository: opendevorg/python-base
|
||||
files: &python-builder_files
|
||||
- docker/python-builder/.*
|
||||
|
||||
@ -235,6 +231,33 @@
|
||||
parent: system-config-promote-image
|
||||
vars: *python-builder_vars
|
||||
files: *python-builder_files
|
||||
|
||||
# python-base jobs
|
||||
- job:
|
||||
name: system-config-build-image-python-base
|
||||
description: Build a python-base image.
|
||||
parent: system-config-build-image
|
||||
vars: &python-base_vars
|
||||
docker_images:
|
||||
- context: docker/python-base
|
||||
repository: opendevorg/python-base
|
||||
files: &python-base_files
|
||||
- docker/python-base/.*
|
||||
|
||||
- job:
|
||||
name: system-config-upload-image-python-base
|
||||
description: Build and upload a python-base image.
|
||||
parent: system-config-upload-image
|
||||
vars: *python-base_vars
|
||||
files: *python-base_files
|
||||
|
||||
- job:
|
||||
name: system-config-promote-image-python-base
|
||||
description: Promote a previously published python-base image to latest.
|
||||
parent: system-config-promote-image
|
||||
vars: *python-base_vars
|
||||
files: *python-base_files
|
||||
|
||||
# Role integration jobs. These test the top-level generic roles/*
|
||||
# under Zuul. The range of platforms should be the same as those for
|
||||
# openstack-zuul-jobs.
|
||||
@ -620,6 +643,7 @@
|
||||
- system-config-build-image-gitea-init
|
||||
- system-config-build-image-gitea
|
||||
- system-config-build-image-gerrit
|
||||
- system-config-build-image-python-base
|
||||
- system-config-build-image-python-builder
|
||||
gate:
|
||||
jobs:
|
||||
@ -645,6 +669,7 @@
|
||||
- system-config-upload-image-gitea-init
|
||||
- system-config-upload-image-gitea
|
||||
- system-config-upload-image-gerrit
|
||||
- system-config-upload-image-python-base
|
||||
- system-config-upload-image-python-builder
|
||||
promote:
|
||||
jobs:
|
||||
@ -652,4 +677,5 @@
|
||||
- system-config-promote-image-gitea-init
|
||||
- system-config-promote-image-gitea
|
||||
- system-config-promote-image-gerrit
|
||||
- system-config-promote-image-python-base
|
||||
- system-config-promote-image-python-builder
|
||||
|
22
docker/python-base/Dockerfile
Normal file
22
docker/python-base/Dockerfile
Normal file
@ -0,0 +1,22 @@
|
||||
# Copyright (c) 2019 Red Hat, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM python:slim
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y dumb-init \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
@ -20,7 +20,7 @@ RUN apt-get update && apt-get install -y equivs
|
||||
COPY python3-dev.control /tmp/python3-dev.control
|
||||
RUN equivs-build /tmp/python3-dev.control
|
||||
|
||||
FROM python:slim as python-builder
|
||||
FROM python:slim
|
||||
|
||||
COPY --from=fake-python /tmp/python3-dev_4.0.0_all.deb /tmp/python3-dev_4.0.0_all.deb
|
||||
COPY scripts/assemble /usr/local/bin/assemble
|
||||
@ -29,11 +29,3 @@ COPY scripts/install-from-bindep /output/install-from-bindep
|
||||
RUN dpkg -i /tmp/python3-dev_4.0.0_all.deb \
|
||||
&& rm /tmp/python3-dev_4.0.0_all.deb \
|
||||
&& pip install bindep
|
||||
|
||||
FROM python:slim as python-base
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y dumb-init \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||
|
Loading…
Reference in New Issue
Block a user