Commit 8ec5d9ff authored by Recteur LP's avatar Recteur LP

Merge branch 'el8' into 'master'

Add CentOS 8 Build

See merge request !1
parents e3b4422f 3a8072d9
Pipeline #1242 failed with stages
in 7 minutes and 31 seconds
......@@ -82,18 +82,40 @@ Docker Goss Tests:
- master
- tags
Docker Build & Release:
Fedora Docker Build & Release:
stage: build
tags:
- docker
script:
- make build CI_COMMIT_TAG=${CI_COMMIT_TAG:-latest}
- make build27 CI_COMMIT_TAG=${CI_COMMIT_TAG:-latest}
- /usr/bin/docker push pyrmin.io/pyrmin/pyrmin:${CI_COMMIT_TAG:-latest}
- /usr/bin/docker push pyrmin.io/pyrmin/pyrmin:27-${CI_COMMIT_TAG:-latest}
- /usr/bin/docker tag pyrmin.io/pyrmin/pyrmin:${CI_COMMIT_TAG:-latest} pyrmin/pyrmin:${CI_COMMIT_TAG:-latest}
- /usr/bin/docker push pyrmin/pyrmin:${CI_COMMIT_TAG:-latest}
- docker-clean
only:
- master
- tags
CentOS 7 Docker Build & Release:
stage: build
tags:
- docker
script:
- make build27 CI_COMMIT_TAG=${CI_COMMIT_TAG:-latest}
- /usr/bin/docker push pyrmin.io/pyrmin/pyrmin:27-${CI_COMMIT_TAG:-latest}
- docker-clean
only:
- master
- tags
CentOS 8 Docker Build & Release:
stage: build
tags:
- docker
script:
- make build-el8 CI_COMMIT_TAG=${CI_COMMIT_TAG:-latest}
- /usr/bin/docker push pyrmin.io/pyrmin/pyrmin-el8:${CI_COMMIT_TAG:-latest}
- docker-clean
only:
- master
- tags
......@@ -30,6 +30,10 @@ build27: auto-proxy
@docker-compose -f docker/python2/docker-compose.yml -p pyrmin build --pull pyrmin
@docker tag pyrmin.io/pyrmin/pyrmin:27-latest pyrmin.io/pyrmin/pyrmin:27-$(CI_COMMIT_TAG)
build-el8: auto-proxy
@docker-compose -f docker/el8/docker-compose.yml -p pyrmin build --pull pyrmin
@docker tag pyrmin.io/pyrmin/pyrmin-el8:latest pyrmin.io/pyrmin/pyrmin-el8:$(CI_COMMIT_TAG)
start:
@docker-compose -f docker/docker-compose.yml -p pyrmin up
......
version: '2'
services:
pyrmin:
image: pyrmin.io/pyrmin/pyrmin-el8:latest
build:
context: ../..
dockerfile: docker/el8/pyrmin.docker
args:
- http_proxy
- https_proxy
ports:
- 8080:8080
environment:
DEBUG: "true"
UPGRADE: "true"
http_proxy: $http_proxy
https_proxy: $http_proxy
#restart: always
volumes:
- /etc/pyrmin:/etc/pyrmin
- /usr/share/pyrmin/plugins:/usr/share/pyrmin/plugins
- /var/www/html:/static
FROM centos:8
MAINTAINER pyrmin.io <support@pyrmin.io>
ADD . /opt/tmp
RUN dnf -v -y install \
dnf \
dnf-plugins-core \
createrepo_c \
python3-pip \
python3-setuptools \
python3-devel \
python-virtualenv \
python3-createrepo_c \
python3-psutil \
python3-lxml \
git \
gcc \
rsync \
libyaml-devel \
openldap-devel \
redhat-rpm-config \
&& useradd pyrmin \
&& mkdir -p /etc/pyrmin /usr/share/pyrmin/plugins /var/log/pyrmin /static \
&& python3 -m venv --symlinks --system-site-packages /opt/pyrmin \
&& source /opt/pyrmin/bin/activate \
&& cd /opt/tmp/ \
&& python3 setup.py install \
&& cd /opt \
&& cp /opt/tmp/conf/pyrmin.yml.default /etc/pyrmin/pyrmin.yml \
&& cp /opt/tmp/docker/entrypoint.sh /entrypoint.sh \
&& chmod +rx /entrypoint.sh \
&& chown -R pyrmin /etc/pyrmin /usr/share/pyrmin/plugins /var/log/pyrmin /opt/pyrmin /static \
&& dnf clean all \
&& rm -rf /usr/share/doc /usr/share/man /tmp/* /opt/tmp
USER pyrmin
WORKDIR /var/log/pyrmin
EXPOSE 8080
VOLUME [ "/etc/pyrmin", "/usr/share/pyrmin/plugins", "/static" ]
CMD [ "/entrypoint.sh" ]
Markdown is supported
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