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

Build images for multiple platforms #169

Merged
merged 51 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
b34a3fa
Multi-image docker
ProgramComputer Dec 29, 2023
f38ce34
Update docker-image.yml
ProgramComputer Dec 29, 2023
b9e1ab4
Update docker-image.yml
ProgramComputer Dec 29, 2023
604e97e
Update docker-image.yml
ProgramComputer Dec 29, 2023
129a8dc
Update docker-image.yml
ProgramComputer Dec 29, 2023
7758554
Update docker-image.yml
ProgramComputer Dec 29, 2023
73426f2
Update docker-image.yml
ProgramComputer Dec 29, 2023
a590abf
Update docker-image.yml
ProgramComputer Dec 29, 2023
f80e26d
Patch 6 (#2)
ProgramComputer Dec 29, 2023
ce68f73
Update docker-image.yml
ProgramComputer Dec 29, 2023
d4d144f
Update docker-image.yml
ProgramComputer Dec 29, 2023
e6a6c1c
Update docker-image.yml
ProgramComputer Dec 29, 2023
66a7ef7
Update docker-image.yml
ProgramComputer Dec 29, 2023
e27d703
Update docker-image.yml
ProgramComputer Dec 29, 2023
aea5b42
Update docker-image.yml
ProgramComputer Dec 29, 2023
bcc116c
Update docker-image.yml
ProgramComputer Dec 29, 2023
c05d390
Update docker-image.yml
ProgramComputer Dec 29, 2023
f84a66c
Update docker-image.yml
ProgramComputer Dec 29, 2023
bdabcfc
Update docker-image.yml
ProgramComputer Dec 29, 2023
8c06d99
Update docker-image.yml
ProgramComputer Dec 29, 2023
803250b
Update docker-image.yml
ProgramComputer Dec 29, 2023
2fc5fab
Update docker-image.yml
ProgramComputer Dec 29, 2023
6c059dd
future php platforms
ProgramComputer Dec 30, 2023
e8af23b
less vulnerabilities for larger size
ProgramComputer Dec 30, 2023
f4db398
Lwt is accessed at /lwt/
ProgramComputer Dec 30, 2023
2167511
Merge branch 'master' into patch-6
ProgramComputer Dec 30, 2023
23db881
Patch 6 (#3)
ProgramComputer Dec 30, 2023
5a0a865
Update docker-image.yml
ProgramComputer Dec 30, 2023
71f3717
Update docker-image.yml
ProgramComputer Dec 30, 2023
70880f1
Update docker-image.yml
ProgramComputer Dec 30, 2023
4040e83
Update Dockerfile
ProgramComputer Dec 30, 2023
9f4b863
Patch 6 (#4)
ProgramComputer Dec 30, 2023
6ea0848
Update Dockerfile
ProgramComputer Dec 30, 2023
03d9cf3
Update Dockerfile
ProgramComputer Dec 30, 2023
55c23e0
Update docker-image.yml
ProgramComputer Dec 30, 2023
2081cd3
Update docker-image.yml
ProgramComputer Dec 30, 2023
0abdf81
Update docker-image.yml
ProgramComputer Dec 30, 2023
8a5c3d2
Update Dockerfile
ProgramComputer Dec 30, 2023
7633180
Update docker-image.yml
ProgramComputer Dec 31, 2023
5e16b48
test no matrix
ProgramComputer Dec 31, 2023
6405662
remove line
ProgramComputer Dec 31, 2023
52c4970
use once
ProgramComputer Dec 31, 2023
e56212f
push is true
ProgramComputer Dec 31, 2023
38be41a
no oci
ProgramComputer Dec 31, 2023
aa7d411
Merge branch 'master' into patch-6
ProgramComputer Dec 31, 2023
15f1d53
Update docker-image.yml
ProgramComputer Dec 31, 2023
aaa106b
Update docker-image.yml
ProgramComputer Dec 31, 2023
9959fad
Update Dockerfile
ProgramComputer Dec 31, 2023
3705cc1
Update docker-image.yml
ProgramComputer Dec 31, 2023
0f5657a
Change permissions
ProgramComputer Jan 3, 2024
7e619e6
Merge branch 'dev' into patch-6
ProgramComputer Jan 3, 2024
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
71 changes: 67 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Docker image

on:
release:
types: [published]
push:
branches: [ 'master' ]
tags:
Expand All @@ -11,16 +13,76 @@ env:
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
build-and-upload-image-to-release:
ProgramComputer marked this conversation as resolved.
Show resolved Hide resolved
permissions: write-all
HugoFara marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
platform: #change platform here and below if changed
- linux/amd64
- linux/386
- linux/arm/v5
- linux/arm/v7
- linux/arm64
- linux/mips64le
- linux/ppc64le
- linux/s390x
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build Docker images
uses: docker/build-push-action@v3
with:
context: .
platforms: ${{ matrix.platform }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=oci,dest=/tmp/image.tar
if: ${{ github.event_name == 'release'}}
- name: Upload binaries to release
if: ${{ github.event_name == 'release'}}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN }}
file: /tmp/image.tar
asset_name: ${{ github.ref_name }}-${{ matrix.platform }}
tag: ${{ github.ref }}
build-and-push-image:
permissions:
packages: write
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:

- name: Checkout repository
uses: actions/checkout@v3


- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
Expand All @@ -39,5 +101,6 @@ jobs:
with:
context: .
push: true
platforms: linux/amd64,linux/386,linux/arm/v5,linux/arm/v7,linux/arm64,linux/mips64le,linux/ppc64le,linux/s390x
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ ARG DB_HOSTNAME=db
ARG DB_USER=root
ARG DB_PASSWORD=root
ARG DB_DATABASE=learning-with-texts
RUN printf '<?php\n$server = "%s";\n$userid = "%s";\n$passwd = "%s";\n$dbname = "%s";\n?>' "$DB_HOSTNAME" "$DB_USER" "$DB_PASSWORD" "$DB_DATABASE" > /var/www/html/lwt/connect.inc.php

RUN printf '<?php\n$server = "%s";\n$userid = "%s";\n$passwd = "%s";\n$dbname = "%s";\n?>' "$DB_HOSTNAME" "$DB_USER" "$DB_PASSWORD" "$DB_DATABASE" > /var/www/html/lwt/connect.inc.php