Skip to content

Commit bf70eb6

Browse files
committed
Add dockerfile
1 parent 4b3f429 commit bf70eb6

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.github/workflows/hub.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Docker Build and Push
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-and-push:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up QEMU
17+
uses: docker/setup-qemu-action@v3
18+
19+
- name: Log in to Docker Hub
20+
uses: docker/login-action@v3
21+
with:
22+
username: ${{ secrets.DOCKER_USERNAME }}
23+
password: ${{ secrets.DOCKER_PASSWORD }}
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v3
27+
28+
- name: Build and Push Docker Image
29+
uses: docker/build-push-action@v6
30+
with:
31+
context: .
32+
push: true
33+
platforms: linux/amd64,linux/arm64,linux/arm/v7
34+
tags: |
35+
${{ secrets.DOCKER_USERNAME }}/get-favicon:latest
36+
${{ secrets.DOCKER_USERNAME }}/get-favicon:${{ github.sha }}

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM php:8.3-apache
2+
3+
WORKDIR /var/www/html
4+
5+
COPY api /var/www/html/
6+
7+
RUN chown -R www-data:www-data /var/www/html
8+
9+
EXPOSE 80
10+
11+
CMD ["apache2-foreground"]

0 commit comments

Comments
 (0)