Skip to content

Commit 0a9b57f

Browse files
Merge pull request ousamabenyounes#41 from kevinfarrugia/main
Update GitHub action to publish to multiple architectures
2 parents fa95412 + d547b53 commit 0a9b57f

File tree

3 files changed

+45
-16
lines changed

3 files changed

+45
-16
lines changed

.github/workflows/docker-image.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,30 @@ jobs:
2020
uses: actions/checkout@v3
2121

2222
- name: Log in to Docker Hub
23-
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
23+
uses: docker/login-action@v3
2424
with:
2525
username: ${{ secrets.DOCKER_USERNAME }}
2626
password: ${{ secrets.DOCKER_PASSWORD }}
2727

2828
- name: Extract metadata for Docker
2929
id: meta
30-
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
30+
uses: docker/metadata-action@v5
3131
with:
3232
images: ${{ secrets.DOCKER_REPOSITORY }}
33-
33+
34+
- name: Set up QEMU
35+
uses: docker/setup-qemu-action@v3
36+
37+
- name: Set up Docker Buildx
38+
uses: docker/setup-buildx-action@v3
39+
3440
- name: Build and push the Docker image
35-
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
41+
uses: docker/build-push-action@v5
3642
with:
3743
context: .
3844
file: ./Dockerfile
3945
push: true
4046
tags: ${{ steps.meta.outputs.tags }}
4147
labels: ${{ steps.meta.outputs.labels }}
48+
platforms: linux/amd64,linux/arm64
49+

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
FROM node:18-alpine
1+
FROM node:18-alpine
22

3-
ENV VERSION=develop
3+
ENV VERSION=main
44

55
WORKDIR /usr/src/ylt
66

77
RUN apk upgrade --update && apk --no-cache add git gcc make g++ zlib-dev libjpeg-turbo-dev nasm automake autoconf libtool \
88
&& git clone https://github.com/YellowLabTools/YellowLabTools-server.git -b ${VERSION} . \
9-
&& NODE_ENV=development && npm install jpegoptim-bin --unsafe-perm=true --allow-root --legacy-peer-deps --omit=dev \
9+
&& NODE_ENV=production && export CPPFLAGS="-DPNG_ARM_NEON_OPT=0" && npm install --unsafe-perm=true --allow-root --legacy-peer-deps --omit=dev \
1010
&& echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" > /etc/apk/repositories \
1111
&& echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
1212
&& echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \

README.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,52 @@
11
# The official Yellow Lab Tools v3 image
2-
[`Yellow Lab Tools`](https://github.com/YellowLabTools/YellowLabTools) is an open source project developed by Gaël Métais.
2+
3+
[`Yellow Lab Tools`](https://github.com/YellowLabTools/YellowLabTools) is an open-source project developed by Gaël Métais.
4+
35
It analyzes a webpage and detects **performance** or **front-end code quality** issues. Free, easy to launch, easy to understand, in-depth details. With this docker image, you can run your own YellowLabTools instance.
6+
47
This image will be updated continuously.
58

9+
## Usage
610

7-
# Usage
8-
```
11+
```sh
912
docker run --privileged -p 8383:8383 ousamabenyounes/yellowlabtools
1013
```
11-
or if you prefer to run it in detached mode adding -d option
1214

13-
```
15+
or if you prefer to run it in detached mode add the `-d` option:
16+
17+
```sh
1418
docker run -d --privileged -p 8383:8383 ousamabenyounes/yellowlabtools
1519
```
1620

1721
And then open [`http://localhost:8383/`](http://localhost:8383/) on your web browser.
1822

23+
## Debug
1924

20-
If you need to run your instance in Debug mode
25+
If you need to run your instance in debug mode, add `'DEBUG=*` to the environment variables:
2126

22-
```
27+
```sh
2328
docker run --privileged --env 'DEBUG=*' -p 8383:8383 ousamabenyounes/yellowlabtools
2429
```
2530

26-
To test your local server on your computer you have to do this:
31+
## Development
2732

28-
replace http://localhost:8080/ by http://host.docker.internal:8080/
33+
You can connect to your fork of YellowLabTools by changing the GitHub repository in the `Dockerfile` and rebuilding the image.
34+
35+
**Dockerfile:**
36+
```diff
37+
- && git clone https://github.com/YellowLabTools/YellowLabTools-server.git -b ${VERSION} . \
38+
+ && git clone https://github.com/kevinfarrugia/YellowLabTools-server.git -b ${VERSION} . \
39+
```
40+
41+
**Build:**
42+
```sh
43+
docker build -t yellowlabtools .
44+
```
45+
46+
**Run:**
47+
```sh
48+
docker run --privileged -p 8383:8383 yellowlabtools
49+
```
2950

3051
# Contributors
3152
- Gaël Métais [gmetais](https://github.com/gmetais)

0 commit comments

Comments
 (0)