Skip to content

Commit

Permalink
use ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
jfouret committed Oct 15, 2024
1 parent d4a0c4e commit 926815c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 16 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ on:

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
REGISTRY_GHCR: ghcr.io
REGISTRY_QUAY: quay.io
IMAGE_NAME: nexomis/pandas

jobs:
build:

runs-on: ubuntu-latest

permissions:
contents: read
packages: write
Expand All @@ -29,23 +31,36 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log into registry ${{ env.REGISTRY }}
- name: Log into GitHub Container Registry ${{ env.REGISTRY_GHCR }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
registry: ${{ env.REGISTRY_GHCR }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Log into Quay.io
- name: Log into Quay.io ${{ env.REGISTRY_QUAY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY_QUAY }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: |
${{ env.REGISTRY_GHCR }}/${{ env.IMAGE_NAME }}
${{ env.REGISTRY_QUAY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=false
prefix=
suffix=
tags: |
type=raw,value=${{ github.ref_name }}
- name: Build and push Docker image
id: build-and-push
Expand All @@ -55,10 +70,4 @@ jobs:
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: |
org.opencontainers.image.created=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
org.opencontainers.image.revision=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
org.opencontainers.image.source=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.source'] }}
org.opencontainers.image.url=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.url'] }}
org.opencontainers.image.version=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
labels: ${{ steps.meta.outputs.labels }}
14 changes: 9 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.19
FROM ubuntu:noble-20240904.1

LABEL org.opencontainers.image.title="Python with pandas"
LABEL org.opencontainers.image.authors="Julien FOURET"
Expand All @@ -8,8 +8,12 @@ LABEL org.opencontainers.image.licenses="Apache-2.0 AND BSD-3-Clause"

ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/Paris"

RUN apk add --no-cache bash py3-pandas=2.0.3-r0 \
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get -y install --no-install-recommends \
python3 \
python3-pandas=2.1.4+dfsg-7 \
bash \
wget \
&& rm -rf /var/lib/apt/lists/*

ENTRYPOINT [""]
CMD [""]

0 comments on commit 926815c

Please sign in to comment.