This repository has been archived by the owner on Aug 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(guardoni): define docker image (#550)
Co-authored-by: ascariandrea <[email protected]>
- Loading branch information
1 parent
dff54dd
commit b3b4dd8
Showing
4 changed files
with
57 additions
and
1 deletion.
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
__mocks__ | ||
.husky | ||
**/build | ||
**/docker | ||
**/docker/electron-builder | ||
**/coverage | ||
**/node_modules | ||
docker | ||
!docker/guardoni/guardoni.config.json |
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,31 @@ | ||
FROM node:16-slim | ||
|
||
RUN mkdir /guardoni | ||
WORKDIR /guardoni | ||
RUN apt-get update | ||
RUN apt-get install -y python3 build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev | ||
|
||
ADD ./ ./ | ||
|
||
RUN yarn install | ||
RUN yarn tk:ext build | ||
RUN yarn yt:ext build | ||
RUN yarn guardoni build:cli | ||
RUN yarn guardoni pkg | ||
WORKDIR /guardoni/platforms/guardoni/dist/ | ||
RUN mv $(ls -1 guardoni-cli*-linux) guardoni-cli | ||
|
||
FROM selenium/standalone-chrome:102.0 | ||
WORKDIR /guardoni | ||
|
||
COPY --from=0 /guardoni/platforms/guardoni/dist/guardoni-cli guardoni-cli | ||
COPY --from=0 "/guardoni/node_modules/@tktrex/extension/build" tktrex | ||
COPY --from=0 "/guardoni/node_modules/@yttrex/extension/build" yttrex | ||
COPY --from=0 /guardoni/docker/guardoni/guardoni.config.json . | ||
|
||
USER root | ||
RUN chmod -R 777 /guardoni/yttrex | ||
RUN chmod -R 777 /guardoni/tktrex | ||
USER seluser | ||
|
||
ENTRYPOINT [ "/guardoni/guardoni-cli" ] |
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,6 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )" | ||
cd "$SCRIPT_DIR/../../" | ||
docker build -f "docker/guardoni/Dockerfile" -t guardoni . |
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,17 @@ | ||
{ | ||
"profileName": "dockerized-guardoni", | ||
"headless": true, | ||
"verbose": false, | ||
"loadFor": 3000, | ||
"yt": { | ||
"name": "youtube", | ||
"backend": "https://youtube.tracking.exposed/api", | ||
"extensionDir": "/guardoni/yttrex" | ||
}, | ||
"tk": { | ||
"name": "tiktok", | ||
"backend": "https://tiktok.tracking.exposed/api", | ||
"extensionDir": "/guardoni/tktrex" | ||
}, | ||
"chromePath": "/usr/bin/google-chrome" | ||
} |