Skip to content

Commit

Permalink
Merge pull request #39 from Chia-Network/2204images
Browse files Browse the repository at this point in the history
  • Loading branch information
cmmarslender authored Aug 29, 2023
2 parents 53d1481 + 18262fe commit c1d1fc7
Show file tree
Hide file tree
Showing 8 changed files with 148 additions and 184 deletions.
56 changes: 8 additions & 48 deletions .github/workflows/build-aptly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,51 +19,11 @@ concurrency:

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

- name: Set up Docker Context for Buildx
id: buildx-context
run: |
docker context create builders
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: latest
endpoint: builders

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PAT }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
chianetwork/aptly
tags: |
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=sha,format=long
- name: Build Docker Container
uses: docker/build-push-action@v4
with:
context: ./aptly
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
uses: Chia-Network/actions/.github/workflows/docker-build.yaml@main
with:
docker-context: "./aptly"
dockerfile: "./aptly/Dockerfile"
dockerhub_imagename: "chianetwork/aptly"
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PAT: ${{ secrets.DOCKERHUB_PAT }}
39 changes: 10 additions & 29 deletions .github/workflows/build-centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,15 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == 'refs/heads/main' && github.sha || '' }}
cancel-in-progress: true


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

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PAT }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
chianetwork/centos7-builder
tags: |
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=sha,format=long
- name: Build Docker Container
uses: docker/build-push-action@v4
with:
context: ./centos7
push: true
tags: ${{ steps.meta.outputs.tags }}
uses: Chia-Network/actions/.github/workflows/docker-build.yaml@main
with:
docker-context: "./centos7"
dockerfile: "./centos7/Dockerfile"
dockerhub_imagename: "chianetwork/centos7-builder"
docker-platforms: linux/amd64
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PAT: ${{ secrets.DOCKERHUB_PAT }}
1 change: 1 addition & 0 deletions .github/workflows/build-manylinux2014-cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [aarch64, x86_64]

Expand Down
56 changes: 8 additions & 48 deletions .github/workflows/build-ubuntu-18.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,51 +19,11 @@ concurrency:

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

- name: Set up Docker Context for Buildx
id: buildx-context
run: |
docker context create builders
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: latest
endpoint: builders

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PAT }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
chianetwork/ubuntu-18.04-builder
tags: |
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=sha,format=long
- name: Build Docker Container
uses: docker/build-push-action@v4
with:
context: ./ubuntu-18.04
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
uses: Chia-Network/actions/.github/workflows/docker-build.yaml@main
with:
docker-context: "./ubuntu-18.04"
dockerfile: "./ubuntu-18.04/Dockerfile"
dockerhub_imagename: "chianetwork/ubuntu-18.04-builder"
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PAT: ${{ secrets.DOCKERHUB_PAT }}
56 changes: 8 additions & 48 deletions .github/workflows/build-ubuntu-20.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,51 +19,11 @@ concurrency:

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

- name: Set up Docker Context for Buildx
id: buildx-context
run: |
docker context create builders
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: latest
endpoint: builders

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PAT }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
chianetwork/ubuntu-20.04-builder
tags: |
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=sha,format=long
- name: Build Docker Container
uses: docker/build-push-action@v4
with:
context: ./ubuntu-20.04
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
uses: Chia-Network/actions/.github/workflows/docker-build.yaml@main
with:
docker-context: "./ubuntu-20.04"
dockerfile: "./ubuntu-20.04/Dockerfile"
dockerhub_imagename: "chianetwork/ubuntu-20.04-builder"
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PAT: ${{ secrets.DOCKERHUB_PAT }}
29 changes: 29 additions & 0 deletions .github/workflows/build-ubuntu-22.04.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build Ubuntu 22.04 Image

on:
push:
branches:
- main
paths:
- 'ubuntu-22.04/*'
- '.github/workflows/build-ubuntu-22.04.yml'
pull_request:
workflow_dispatch:
schedule:
- cron: '30 12 * * 5'

concurrency:
# SHA is added to the end if on `main` to let all main workflows run
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == 'refs/heads/main' && github.sha || '' }}
cancel-in-progress: true

jobs:
build:
uses: Chia-Network/actions/.github/workflows/docker-build.yaml@main
with:
docker-context: "./ubuntu-22.04"
dockerfile: "./ubuntu-22.04/Dockerfile"
dockerhub_imagename: "chianetwork/ubuntu-22.04-builder"
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PAT: ${{ secrets.DOCKERHUB_PAT }}
31 changes: 20 additions & 11 deletions ubuntu-20.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM ubuntu:20.04

ENV PYENV_ROOT=/root/.pyenv
ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH"

RUN apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
apt-utils \
software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa -y && \
add-apt-repository ppa:git-core/ppa -y && \
add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
Expand All @@ -17,20 +19,27 @@ RUN apt-get update && \
g++-10 \
git \
jq \
python3.9 \
python3.9-venv \
libpython3.9-dev \
libbz2-dev \
libffi-dev \
liblzma-dev \
libncursesw5-dev \
libreadline-dev \
libssl-dev \
libsqlite3-dev \
libxml2-dev \
libxmlsec1-dev \
sudo \
tk-dev \
vim \
wget \
xz-utils \
zlib1g-dev && \
# Sets up some useful symlinks \
python3.9 -m ensurepip && \
ln -sf "$(which python3.9)" /usr/bin/python && \
ln -sf "$(which python3.9)" /usr/bin/python3 && \
ln -sf "$(which pip3.9)" /usr/bin/pip && \
ln -sf "$(which pip3.9)" /usr/bin/pip3 && \
pip3 install --no-cache-dir py3createtorrent && \
# Set up pyenv \
git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \
pyenv install 3.9 && \
pyenv global 3.9 && \
pip install --upgrade pip && \
pip install --no-cache-dir py3createtorrent && \
rm -rf /var/lib/apt/lists/*

# Add nodejs
Expand Down
64 changes: 64 additions & 0 deletions ubuntu-22.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
FROM ubuntu:22.04

ENV PYENV_ROOT=/root/.pyenv
ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH"

RUN apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
apt-utils \
gpg \
gpg-agent \
software-properties-common && \
add-apt-repository ppa:git-core/ppa -y && \
add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
awscli \
build-essential \
curl \
dialog \
fakeroot \
g++-12 \
g++-13 \
git \
jq \
libbz2-dev \
libffi-dev \
liblzma-dev \
libncursesw5-dev \
libreadline-dev \
libssl-dev \
libsqlite3-dev \
libxml2-dev \
libxmlsec1-dev \
sudo \
tk-dev \
vim \
wget \
xz-utils \
zlib1g-dev && \
# Set up pyenv \
git clone https://github.com/pyenv/pyenv.git ~/.pyenv && \
pyenv install 3.10 && \
pyenv global 3.10 && \
pip install --upgrade pip && \
pip install --no-cache-dir py3createtorrent && \
rm -rf /var/lib/apt/lists/*

# Add nodejs
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
apt-get install -y nodejs

# Newer version of CMAKE
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null && \
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null && \
apt-get update && \
apt-get install cmake -y && \
rm -rf /var/lib/apt/lists/*

# Add GitHub CLI
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& apt update \
&& apt install gh -y

0 comments on commit c1d1fc7

Please sign in to comment.