Skip to content

Commit 43193df

Browse files
committed
Initial commit
0 parents  commit 43193df

File tree

2 files changed

+170
-0
lines changed

2 files changed

+170
-0
lines changed

Diff for: .github/workflows/push-docker-container.yml

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: "Push Docker Container"
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'Additional tag to push'
8+
required: false
9+
push:
10+
branches:
11+
- '*'
12+
tags:
13+
- '*'
14+
15+
jobs:
16+
docker:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: true
20+
matrix:
21+
include:
22+
# - ubuntu-version: 20.04
23+
# php-version: php81-fpm
24+
# node-version: 12
25+
# - ubuntu-version: 20.04
26+
# php-version: php81-fpm
27+
# node-version: 20
28+
- ubuntu-version: 20.04
29+
php-version: php82-fpm
30+
node-version: 12
31+
# - ubuntu-version: 20.04
32+
# php-version: php82-fpm
33+
# node-version: 20
34+
# - ubuntu-version: 20.04
35+
# php-version: php83-fpm
36+
# node-version: 12
37+
# - ubuntu-version: 20.04
38+
# php-version: php83-fpm
39+
# node-version: 20
40+
41+
steps:
42+
-
43+
name: Checkout
44+
uses: actions/checkout@v3
45+
-
46+
name: Docker meta
47+
id: meta
48+
uses: docker/metadata-action@v4
49+
with:
50+
images: |
51+
ghcr.io/${{ github.repository }}
52+
flavor: |
53+
suffix=-${{matrix.ubuntu-version}}-${{matrix.php-version}}-${{matrix.node-version}}
54+
tags: |
55+
type=ref,event=branch
56+
type=semver,pattern={{version}}
57+
type=semver,pattern={{major}}.{{minor}}
58+
type=semver,pattern={{major}}
59+
type=sha
60+
type=raw,value=${{ inputs.tag }},enable=${{ inputs.tag != '' }}
61+
-
62+
name: Set up QEMU
63+
uses: docker/setup-qemu-action@v2
64+
-
65+
name: Set up Docker Buildx
66+
uses: docker/setup-buildx-action@v2
67+
-
68+
name: Login to GitHub Container Registry
69+
uses: docker/login-action@v2
70+
with:
71+
registry: ghcr.io
72+
username: ${{ github.repository_owner }}
73+
password: ${{ secrets.GITHUB_TOKEN }}
74+
-
75+
name: Build and push
76+
uses: docker/build-push-action@v4
77+
with:
78+
context: .
79+
platforms: linux/amd64,linux/arm64
80+
push: true
81+
build-args: |
82+
UBUNTU_VERSION=${{matrix.ubuntu-version}}
83+
PHP_VERSION=${{matrix.php-version}}
84+
NODE_VERSION=${{matrix.node-version}}
85+
tags: ${{ steps.meta.outputs.tags }}
86+
labels: ${{ steps.meta.outputs.labels }}

Diff for: Dockerfile

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
2+
ARG UBUNTU_VERSION=22.04
3+
FROM ubuntu:${UBUNTU_VERSION}
4+
ARG UBUNTU_VERSION
5+
ARG NODE_VERSION=20
6+
ARG PHP_VERSION=8.2
7+
8+
LABEL ubuntu=${UBUNTU_VERSION}
9+
LABEL php=${PHP_VERSION}
10+
LABEL node=${NODE_VERSION}
11+
12+
ENV TZ=UTC
13+
14+
RUN export LC_ALL=C.UTF-8 && \
15+
DEBIAN_FRONTEND=noninteractive && \
16+
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
17+
18+
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
19+
20+
RUN apt-get update && \
21+
apt-get install -y \
22+
sudo \
23+
autoconf \
24+
autogen \
25+
language-pack-en-base \
26+
wget \
27+
zip \
28+
unzip \
29+
curl \
30+
rsync \
31+
ssh \
32+
openssh-client \
33+
git \
34+
build-essential \
35+
apt-utils \
36+
software-properties-common \
37+
nasm \
38+
libjpeg-dev \
39+
libpng-dev \
40+
libpng16-16 && \
41+
# PHP
42+
LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php && apt-get update && \
43+
apt-get install -y \
44+
php${PHP_VERSION} \
45+
php${PHP_VERSION}-curl \
46+
php${PHP_VERSION}-gd \
47+
php${PHP_VERSION}-dev \
48+
php${PHP_VERSION}-xml \
49+
php${PHP_VERSION}-bcmath \
50+
php${PHP_VERSION}-mysql \
51+
php${PHP_VERSION}-pgsql \
52+
php${PHP_VERSION}-mbstring \
53+
php${PHP_VERSION}-zip \
54+
php${PHP_VERSION}-bz2 \
55+
php${PHP_VERSION}-sqlite \
56+
php${PHP_VERSION}-soap \
57+
php${PHP_VERSION}-intl \
58+
php${PHP_VERSION}-imap \
59+
php${PHP_VERSION}-imagick \
60+
php-memcached && \
61+
# install Node
62+
curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x -o nodesource_setup.sh && bash nodesource_setup.sh && \
63+
apt-get install nodejs -y && \
64+
npm install npm@6 -g && \
65+
# Clean up caches
66+
apt-get clean && rm -rf /var/cache/apt/lists
67+
68+
# Composer
69+
RUN curl -sS https://getcomposer.org/installer | php && \
70+
mv composer.phar /usr/local/bin/composer && \
71+
chmod +x /usr/local/bin/composer && \
72+
composer self-update
73+
74+
RUN curl https://get.volta.sh | bash
75+
76+
# Other
77+
RUN mkdir ~/.ssh && \
78+
touch ~/.ssh_config
79+
80+
# Display versions installed
81+
RUN php -v
82+
RUN composer --version
83+
RUN node -v
84+
RUN npm -v

0 commit comments

Comments
 (0)