Skip to content

Commit

Permalink
adding podman image
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdkelly88 committed Dec 3, 2023
1 parent 0bf0683 commit 9103e36
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/docker-hub-container-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Docker Hub Standard Image CI

on:
push:
branches: [ "main" ]

env:
DOCKER_USERNAME: jamesdkelly88
DOCKER_IMAGE: azure-pipelines-agent

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: ./container-image
file: ./container-image/container.Dockerfile
push: true
tags: |
${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE }}:container
${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE }}:container-jammy
${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE }}:container-${{ github.sha }}
5 changes: 3 additions & 2 deletions .github/workflows/docker-hub-standard-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
push: true
tags: |
${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE }}:latest
${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE }}:jammy
${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE }}:jammy-standard
${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE }}:standard
${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE }}:standard-jammy
${{ env.DOCKER_USERNAME }}/${{ env.DOCKER_IMAGE }}:standard-${{ github.sha }}
30 changes: 30 additions & 0 deletions container-image/container.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ubuntu:22.04 AS linux
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get upgrade -y

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
apt-transport-https \
apt-utils \
ca-certificates \
curl \
git \
iputils-ping \
jq \
podman \
lsb-release \
software-properties-common

# alias podman to docker
RUN ln -s /usr/bin/podman /usr/bin/docker

RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash

# Can be 'linux-x64', 'linux-arm64', 'linux-arm', 'rhel.6-x64'.
ENV TARGETARCH=linux-x64

WORKDIR /azp

COPY ./start.sh .
RUN chmod +x start.sh

ENTRYPOINT [ "./start.sh" ]

0 comments on commit 9103e36

Please sign in to comment.