feat: multi arch docker images (#2123)
This commit is contained in:
parent
4f2e582cf7
commit
1110494615
7 changed files with 40 additions and 3 deletions
4
.github/workflows/docker-build.yml
vendored
4
.github/workflows/docker-build.yml
vendored
|
|
@ -30,6 +30,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
id: qemu
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to Docker Hub
|
||||
|
|
@ -52,6 +53,7 @@ jobs:
|
|||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: "linux/amd64,linux/arm64/v8"
|
||||
file: ${{ env.DOCKERFILE }}
|
||||
tags: ${{ env.TAGS }}
|
||||
- name: Wait for Docker Hub to propagate
|
||||
|
|
@ -62,6 +64,7 @@ jobs:
|
|||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: "linux/amd64,linux/arm64/v8"
|
||||
file: ./docker/build_and_push_backend.Dockerfile
|
||||
build-args: |
|
||||
LANGFLOW_IMAGE=langflowai/langflow:${{ inputs.version }}
|
||||
|
|
@ -75,6 +78,7 @@ jobs:
|
|||
context: .
|
||||
push: true
|
||||
file: ./docker/frontend/build_and_push_frontend.Dockerfile
|
||||
platforms: "linux/amd64,linux/arm64/v8"
|
||||
tags: |
|
||||
langflowai/langflow-frontend:${{ inputs.version }}
|
||||
langflowai/langflow-frontend:1.0-alpha
|
||||
|
|
|
|||
21
.github/workflows/docker_test.yml
vendored
21
.github/workflows/docker_test.yml
vendored
|
|
@ -8,6 +8,7 @@ on:
|
|||
- "poetry.lock"
|
||||
- "pyproject.toml"
|
||||
- "src/backend/**"
|
||||
- ".github/workflows/docker_test.yml"
|
||||
pull_request:
|
||||
branches: [dev]
|
||||
paths:
|
||||
|
|
@ -15,12 +16,13 @@ on:
|
|||
- "poetry.lock"
|
||||
- "pyproject.toml"
|
||||
- "src/**"
|
||||
- ".github/workflows/docker_test.yml"
|
||||
|
||||
env:
|
||||
POETRY_VERSION: "1.8.2"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
test-docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
@ -59,3 +61,20 @@ jobs:
|
|||
docker build -t langflowai/langflow-frontend:latest-dev \
|
||||
-f docker/frontend/build_and_push_frontend.Dockerfile \
|
||||
.
|
||||
test-multi-arch-build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
id: qemu
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: false
|
||||
file: ./docker/build_and_push.Dockerfile
|
||||
platforms: "linux/amd64,linux/arm64/v8"
|
||||
tags: langflowai/langflow:latest-dev
|
||||
|
|
|
|||
2
.github/workflows/pre-release-base.yml
vendored
2
.github/workflows/pre-release-base.yml
vendored
|
|
@ -60,6 +60,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
id: qemu
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to Docker Hub
|
||||
|
|
@ -73,5 +74,6 @@ jobs:
|
|||
context: .
|
||||
push: true
|
||||
file: ./docker/build_and_push_base.Dockerfile
|
||||
platforms: "linux/amd64,linux/arm64/v8"
|
||||
tags: |
|
||||
langflowai/langflow:base-${{ needs.release.outputs.version }}
|
||||
|
|
|
|||
4
.github/workflows/pre-release-langflow.yml
vendored
4
.github/workflows/pre-release-langflow.yml
vendored
|
|
@ -66,6 +66,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
id: qemu
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to Docker Hub
|
||||
|
|
@ -79,6 +80,7 @@ jobs:
|
|||
context: .
|
||||
push: true
|
||||
file: ./docker/build_and_push.Dockerfile
|
||||
platforms: "linux/amd64,linux/arm64/v8"
|
||||
tags: |
|
||||
langflowai/langflow:${{ needs.release.outputs.version }}
|
||||
langflowai/langflow:1.0-alpha
|
||||
|
|
@ -88,6 +90,7 @@ jobs:
|
|||
context: .
|
||||
push: true
|
||||
file: ./docker/frontend/build_and_push_frontend.Dockerfile
|
||||
platforms: "linux/amd64,linux/arm64/v8"
|
||||
tags: |
|
||||
langflowai/langflow-frontend:${{ needs.release.outputs.version }}
|
||||
langflowai/langflow-frontend:1.0-alpha
|
||||
|
|
@ -99,6 +102,7 @@ jobs:
|
|||
context: .
|
||||
push: true
|
||||
file: ./docker/build_and_push_backend.Dockerfile
|
||||
platforms: "linux/amd64,linux/arm64/v8"
|
||||
build-args: |
|
||||
LANGFLOW_IMAGE=langflowai/langflow:${{ needs.release.outputs.version }}
|
||||
tags: |
|
||||
|
|
|
|||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
|
@ -38,6 +38,7 @@ jobs:
|
|||
poetry publish
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
id: qemu
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to Docker Hub
|
||||
|
|
@ -51,6 +52,7 @@ jobs:
|
|||
context: .
|
||||
push: true
|
||||
file: ./docker/build_and_push.Dockerfile
|
||||
platforms: "linux/amd64,linux/arm64/v8"
|
||||
tags: |
|
||||
langflowai/langflow:${{ steps.check-version.outputs.version }}
|
||||
langflowai/langflow:latest
|
||||
|
|
@ -62,6 +64,7 @@ jobs:
|
|||
context: .
|
||||
push: true
|
||||
file: ./docker/build_and_push_backend.Dockerfile
|
||||
platforms: "linux/amd64,linux/arm64/v8"
|
||||
build-args: |
|
||||
LANGFLOW_IMAGE=langflowai/langflow:${{ steps.check-version.outputs.version }}
|
||||
tags: |
|
||||
|
|
@ -73,6 +76,7 @@ jobs:
|
|||
context: .
|
||||
push: true
|
||||
file: ./docker/frontend/build_and_push_frontend.Dockerfile
|
||||
platforms: "linux/amd64,linux/arm64/v8"
|
||||
tags: |
|
||||
langflowai/langflow-frontend:${{ steps.check-version.outputs.version }}
|
||||
langflowai/langflow-frontend:latest
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@
|
|||
# BUILDER-BASE
|
||||
# Used to build deps + create our virtual environment
|
||||
################################
|
||||
FROM python:3.12-slim as builder-base
|
||||
|
||||
# force platform to the current architecture to increase build speed time on multi-platform builds
|
||||
FROM --platform=$BUILDPLATFORM python:3.12-slim as builder-base
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
\
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@
|
|||
################################
|
||||
# BUILDER-BASE
|
||||
################################
|
||||
FROM node:lts-bookworm-slim as builder-base
|
||||
|
||||
# force platform to the current architecture to increase build speed time on multi-platform builds
|
||||
FROM --platform=$BUILDPLATFORM node:lts-bookworm-slim as builder-base
|
||||
COPY src/frontend /frontend
|
||||
|
||||
RUN cd /frontend && npm install && npm run build
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue