Compare commits

...

4 Commits

Author SHA1 Message Date
Isaac Abadi
67d4c8a5ce Added github actions to test PR with a docker build 2022-05-01 15:45:30 -04:00
Isaac Abadi
fe187ed55b Added yarn back to Dockerfile
Set strict-ssl to false for npm in Dockerfile
2022-05-01 15:12:46 -04:00
Isaac Abadi
945e784950 Merge branch 'master' of https://github.com/Tzahi12345/YoutubeDL-Material into further-docker-cleanup 2022-05-01 15:06:01 -04:00
Isaac Abadi
b153799531 Dockerfile cleanup 2022-05-01 14:02:39 -04:00
2 changed files with 52 additions and 14 deletions

42
.github/workflows/docker-pr.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: docker-pr
on:
pull_request:
branches: [master]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
- name: Set hash
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: create-json
id: create-json
uses: jsdaniell/create-json@1.1.2
with:
name: "version.json"
json: '{"type": "docker", "tag": "nightly", "commit": "${{ steps.vars.outputs.sha_short }}", "date": "${{ steps.date.outputs.date }}"}'
dir: 'backend/'
- name: setup platform emulator
uses: docker/setup-qemu-action@v1
- name: setup multi-arch docker build
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build & push images
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm,linux/arm64/v8
push: false
tags: tzahi12345/youtubedl-material:nightly-pr

View File

@@ -8,18 +8,12 @@ RUN sh ./docker-build.sh
FROM ubuntu:20.04 as frontend
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get -y install \
wget \
curl \
gnupg && \
curl -sL https://deb.nodesource.com/setup_12.x | bash - && \
apt-get -y install \
nodejs \
# YARN: brings along npm, solves dependency conflicts,
# spares us this spaghetti approach: https://stackoverflow.com/a/60547197
yarn && \
apt-get install -f && \
npm install -g @angular/cli
RUN apt-get update && apt-get -y install curl
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt-get -y install nodejs \
yarn
RUN npm config set strict-ssl false
RUN npm install -g @angular/cli
WORKDIR /build
COPY [ "package.json", "package-lock.json", "/build/" ]
@@ -44,16 +38,18 @@ RUN groupadd -g $GID $USER && useradd --system -g $USER --uid $UID $USER
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt-get update && apt-get -y install \
npm \
nodejs \
yarn \
python2 \
python3 \
atomicparsley && \
apt-get install -f && \
apt-get autoremove --purge && \
apt-get autoremove && \
apt-get clean && \
rm -rf /var/lib/apt
RUN npm config set strict-ssl false
WORKDIR /app
COPY --from=ffmpeg /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg
COPY --from=ffmpeg /usr/local/bin/ffprobe /usr/local/bin/ffprobe