Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker image for LTS packages #403

Merged
merged 9 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
type=ref,event=pr
type=match,pattern=lts-pkg-build-(.*),group=1,suffix=-lts
JeanChristopheMorinPerso marked this conversation as resolved.
Show resolved Hide resolved

- 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') }}
10 changes: 10 additions & 0 deletions anaconda-pkg-build-lts/linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 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 && /opt/conda/bin/conda update conda conda-build
JeanChristopheMorinPerso marked this conversation as resolved.
Show resolved Hide resolved

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

CMD [ "/bin/bash" ]
Loading