Commit a76053c3 authored by Adam Mercer's avatar Adam Mercer

add an initial build of a docker container

parent 853963bd
Pipeline #62533 passed with stages
in 8 minutes and 7 seconds
FROM ligo/base:el7
LABEL name="Koji Packager" \
maintainer="Adam Mercer <adam.mercer@ligo.org>" \
date="20190518" \
support="Best Effort"
# copy RPM to container
COPY dist /dist
# switch to upstream EPEL
RUN yum -y install epel-release && \
rm /etc/yum.repos.d/lscsoft-epel.repo && \
rm -rf /var/cache/yum/x86_64/7/lscsoft-epel
# install updates
RUN yum makecache && yum -y update
# install koji-packager
RUN yum -y localinstall /dist/el7/python36-gwkoji-*.rpm && \
rm -rf /dist
# install extra deps
RUN yum -y install \
git2u \
git-lfs \
sudo && \
yum clean all
# setup environment
COPY /environment/sudoers.d/albert /etc/sudoers.d/albert
RUN chmod 0640 /etc/sudoers.d/albert
COPY /environment/koji.conf /etc/koji.conf
COPY /environment/krb5.conf /etc/krb5.conf
COPY /environment/mock /etc/mock
RUN mkdir /container
# setup user
RUN useradd -m -d /container/albert -s /bin/bash albert
RUN su - albert -c "git lfs install"
# enter shell
USER albert
WORKDIR /container/albert
CMD ["/bin/bash", "-l"]
\ No newline at end of file
......@@ -8,6 +8,7 @@ stages:
variables:
PIP_CACHE_DIR: "${CI_PROJECT_DIR}/.cache/pip"
YUM_OPTS: "-y -q --setopt=cachedir=${CI_PROJECT_DIR}/.cache/yum --setopt=keepcache=1"
NIGHTLY_CONTAINER: "${CI_REGISTRY_IMAGE}/nightly:el7"
cache:
key: "${CI_JOB_NAME}"
......@@ -129,6 +130,16 @@ test:el7:
paths:
- .cache/yum
test:nightly:docker:
image: docker:latest
stage: test
dependencies:
- build:el7
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build --pull -t ${NIGHTLY_CONTAINER} --file .gitlab-ci.Dockerfile .
- docker push ${NIGHTLY_CONTAINER}
# -- docs -------------------
docs:
......
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