-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #326 from tighten/tm/docker-install
Docker Install
- Loading branch information
Showing
8 changed files
with
184 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Docker | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tagInput: | ||
description: 'Tag' | ||
required: true | ||
|
||
release: | ||
types: [created] | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: docker.io | ||
username: ${{ secrets.DOCKER_HUB_USER }} | ||
password: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
- name: Determine version tag | ||
id: version-tag | ||
run: | | ||
INPUT_VALUE="${{ github.event.inputs.tagInput }}" | ||
if [ -z "$INPUT_VALUE" ]; then | ||
INPUT_VALUE="${{ github.ref_name }}" | ||
fi | ||
echo "::set-output name=value::$INPUT_VALUE" | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: | | ||
tighten/takeout:latest | ||
tighten/takeout:${{ steps.version-tag.outputs.value }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM php:8.1-cli-alpine | ||
|
||
ENV TAKEOUT_CONTAINER=1 | ||
|
||
COPY --from=docker/buildx-bin /buildx /usr/libexec/docker/cli-plugins/docker-buildx | ||
|
||
# Install the PHP extensions & Docker | ||
RUN apk add --no-cache --update docker openrc ncurses \ | ||
&& docker-php-ext-configure pcntl --enable-pcntl \ | ||
&& docker-php-ext-install -j$(nproc) pcntl \ | ||
&& rc-update add docker boot | ||
|
||
WORKDIR /takeout | ||
|
||
COPY builds/takeout /usr/local/bin/takeout | ||
|
||
ENTRYPOINT ["takeout"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace Tests\Support; | ||
|
||
use App\Shell\DockerTags; | ||
|
||
class FakePlatformDockerTags extends DockerTags | ||
{ | ||
const M1_ARM_PLATFORM = 'arm64'; | ||
const LINUX_ARM_PLATFORM = 'aarch64'; | ||
const INTEL_ARM_PLATFORM = 'x86_64'; | ||
|
||
protected string $fakePlatform; | ||
|
||
public function withFakePlatform(string $platform): self | ||
{ | ||
$this->fakePlatform = $platform; | ||
|
||
return $this; | ||
} | ||
|
||
protected function platform(): string | ||
{ | ||
return $this->fakePlatform; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.