Merge branch 'develop' into 'main'
Some checks failed
Build podman-dind-like / build-and-push (GITHUB_TOKEN, HOME_NEXUS_DOCKER_PASSWORD, NEXUS_DOCKER_USER, ghcr.io, $NEXUS_PROXY_REGISTRY, GITHUB_DOCKER_USER) (push) Has been cancelled
Build podman-dind-like / build-and-push (HOME_NEXUS_DOCKER_PASSWORD, HOME_NEXUS_DOCKER_PASSWORD, NEXUS_DOCKER_USER, nexus.jamesjonesconsulting.com:5443, $NEXUS_PROXY_REGISTRY, NEXUS_DOCKER_USER) (push) Has been cancelled
Some checks failed
Build podman-dind-like / build-and-push (GITHUB_TOKEN, HOME_NEXUS_DOCKER_PASSWORD, NEXUS_DOCKER_USER, ghcr.io, $NEXUS_PROXY_REGISTRY, GITHUB_DOCKER_USER) (push) Has been cancelled
Build podman-dind-like / build-and-push (HOME_NEXUS_DOCKER_PASSWORD, HOME_NEXUS_DOCKER_PASSWORD, NEXUS_DOCKER_USER, nexus.jamesjonesconsulting.com:5443, $NEXUS_PROXY_REGISTRY, NEXUS_DOCKER_USER) (push) Has been cancelled
Adding on Nexus3 proxies and adjusting for ansible collections See merge request ymdllc/containers/podman-dind-like!13
This commit is contained in:
@@ -20,13 +20,12 @@ stages:
|
||||
|
||||
.shared_resources:
|
||||
script: &build_push
|
||||
- docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASSWORD" $REGISTRY
|
||||
- podman login -u "$REGISTRY_USER" -p "$REGISTRY_PASSWORD" $REGISTRY
|
||||
- export REGISTRY_IMAGE_LOWER=$(echo "$REGISTRY_IMAGE" | tr '[:upper:]' '[:lower:]')
|
||||
- docker build --pull -t "$REGISTRY_IMAGE_LOWER:$IMAGE_TAG" --build-arg ARTIFACTORY=$HOME_NEXUS_DOCKER_REGISTRY_PROXY .
|
||||
- docker push "$REGISTRY_IMAGE_LOWER:$IMAGE_TAG"
|
||||
- podman build --pull -t "$REGISTRY_IMAGE_LOWER:$IMAGE_TAG" --build-arg ARTIFACTORY=$HOME_NEXUS_DOCKER_REGISTRY_PROXY .
|
||||
- podman push "$REGISTRY_IMAGE_LOWER:$IMAGE_TAG"
|
||||
before_script: &before_auth
|
||||
- dnf install -y podman-docker
|
||||
- docker login -u "$HOME_NEXUS_DOCKER_USER" -p "$HOME_NEXUS_DOCKER_PASSWORD" $HOME_NEXUS_DOCKER_REGISTRY_PROXY
|
||||
- podman login -u "$HOME_NEXUS_DOCKER_USER" -p "$HOME_NEXUS_DOCKER_PASSWORD" $HOME_NEXUS_DOCKER_REGISTRY_PROXY
|
||||
|
||||
build:prereleases:
|
||||
stage: dind-build
|
||||
@@ -58,8 +57,8 @@ build:releases:
|
||||
script:
|
||||
- export IMAGE_TAG=$CI_COMMIT_TAG
|
||||
- *build_push
|
||||
- docker tag "$REGISTRY_IMAGE_LOWER:$IMAGE_TAG" "$REGISTRY_IMAGE_LOWER:latest"
|
||||
- docker push "$REGISTRY_IMAGE_LOWER:latest"
|
||||
- podman tag "$REGISTRY_IMAGE_LOWER:$IMAGE_TAG" "$REGISTRY_IMAGE_LOWER:latest"
|
||||
- podman push "$REGISTRY_IMAGE_LOWER:latest"
|
||||
only:
|
||||
refs:
|
||||
- tags
|
||||
|
||||
13
Dockerfile
13
Dockerfile
@@ -6,17 +6,18 @@ FROM ${ARTIFACTORY}/podman/stable:latest
|
||||
RUN dnf install -y podman-docker buildah skopeo \
|
||||
util-linux ansible-core openssh-clients krb5-devel krb5-libs krb5-workstation git jq wget curl unzip coreutils \
|
||||
helm doctl kubernetes-client gnupg2 pinentry expect gh awscli \
|
||||
python3-jsonpatch python3-requests-oauthlib python3-kubernetes \
|
||||
python3-jsonpatch python3-requests-oauthlib python3-kubernetes python3-pip \
|
||||
&& rpm --import https://packages.microsoft.com/keys/microsoft.asc \
|
||||
&& dnf install -y https://packages.microsoft.com/config/rhel/9.0/packages-microsoft-prod.rpm \
|
||||
&& dnf install -y azure-cli \
|
||||
&& dnf install -y rpm-build rpm-sign rubygems ruby-devel gcc gcc-c++ make libffi-devel \
|
||||
&& dnf install -y ansible-collection* \
|
||||
&& dnf clean all \
|
||||
&& rm -rf /var/cache/yum \
|
||||
&& wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq \
|
||||
&& chmod +x /usr/bin/yq \
|
||||
&& curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp \
|
||||
&& sudo mv /tmp/eksctl /usr/bin \
|
||||
&& mv /tmp/eksctl /usr/bin \
|
||||
&& touch /etc/containers/nodocker
|
||||
|
||||
# Adding some Ansible Key and Timeout setting as well as accepting ssh-rsa
|
||||
@@ -28,6 +29,14 @@ RUN chown root:root /etc/ssh/ssh_config.d/99-ansible.conf && chmod 644 /etc/ssh/
|
||||
|
||||
# Ensuring the fpm tool is installed to build distro packages such as RPM and DEB
|
||||
COPY rpm-sign-expect /usr/bin
|
||||
RUN curl -k -s -o - \
|
||||
https://nexus.jamesjonesconsulting.com/repository/package-config/rubygems/rubygems-repos.sh |\
|
||||
bash
|
||||
RUN gem install ffi \
|
||||
&& gem install fpm \
|
||||
&& chmod +x /usr/bin/rpm-sign-expect
|
||||
|
||||
# Setting up Pypi to use proxy
|
||||
RUN curl -k -s -o - \
|
||||
https://nexus.jamesjonesconsulting.com/repository/package-config/pypi/python3-pypi-repos.sh |\
|
||||
bash
|
||||
Reference in New Issue
Block a user