Skip to content

Commit

Permalink
Add docker image for LTS packages (#403)
Browse files Browse the repository at this point in the history
Co-authored-by: Anju Thomas <anjuthomas@Anjus-MBP.home>
Co-authored-by: Jean-Christophe Morin <jcmorin@anaconda.com>
Co-authored-by: Jean-Christophe Morin <38703886+JeanChristopheMorinPerso@users.noreply.github.com>
Co-authored-by: Daniel Bast <2790401+dbast@users.noreply.github.com>
  • Loading branch information
5 people committed Sep 26, 2023
1 parent 8ca176f commit b097672
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/anaconda_pkg_build_lts_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Build and publish Linux package builder images for LTS
on:
push:
branches:
- main
tags:
- 'lts-pkg-build-*'
paths:
- 'anaconda-pkg-build-lts/linux/Dockerfile'
- '.github/workflows/anaconda_pkg_build_lts_linux.yml'
pull_request:
paths:
- 'anaconda-pkg-build-lts/linux/Dockerfile'
- '.github/workflows/anaconda_pkg_build_lts_linux.yml'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v3

- name: Login to DockerHub
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v2
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to Public ECR
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v2
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')
with:
registry: public.ecr.aws
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
env:
AWS_REGION: us-east-1

- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v2

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v2
with:
version: latest
driver-opts: network=host

- name: Docker meta
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v4
with:
images: |
continuumio/anaconda-pkg-build
public.ecr.aws/y0o4y9o3/anaconda-pkg-build
tags: |
type=ref,event=branch,suffix=-lts
type=ref,event=pr,suffix=-lts
type=match,pattern=lts-pkg-build-(.*),group=1,suffix=-lts
- name: build-push pkg-builder
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v4
with:
context: ./anaconda-pkg-build-lts/linux
builder: ${{ steps.buildx.outputs.name }}
file: ./anaconda-pkg-build-lts/linux/Dockerfile
platforms: linux/amd64,linux/ppc64le,linux/arm64/v8,linux/s390x
build-args: |
BASEVERSION=7
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags') }}
12 changes: 12 additions & 0 deletions anaconda-pkg-build-lts/linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Dockerfile for container images that Anaconda, Inc. uses to build conda
# packages released on the "defaults" (repo.anaconda.com) channels.

FROM continuumio/anaconda-pkg-build:2023.03.28

RUN /opt/conda/bin/conda install --quiet --yes jcmorin-ana-org::anaconda-time-machine=0.4.0 \
&& /opt/conda/bin/conda update --quiet --yes conda conda-build \
&& /opt/conda/bin/conda clean --index-cache --yes

ENV PATH="/opt/conda/bin:${PATH}"

CMD [ "/bin/bash" ]

0 comments on commit b097672

Please sign in to comment.