diff --git a/.github/workflows/dev-image.yml b/.github/workflows/dev-image.yml index e7b5dd3..e550dce 100644 --- a/.github/workflows/dev-image.yml +++ b/.github/workflows/dev-image.yml @@ -31,7 +31,7 @@ jobs: --platform linux/amd64,linux/arm64 \ --output "type=image,push=false" \ --tag albertoxamin/bang:dev \ - --file ./Dockerfile ./ + --file ./Dockerfile-armv7 ./ - name: Docker Buildx (build) run: | @@ -56,7 +56,7 @@ jobs: --platform linux/amd64,linux/arm/v7,linux/arm64 \ --output "type=image,push=true" \ --tag albertoxamin/bang:dev \ - --file ./Dockerfile ./ + --file ./Dockerfile-armv7 ./ - name: Inspect image run: | diff --git a/Dockerfile-armv7 b/Dockerfile-armv7 index 06a1600..e711af1 100644 --- a/Dockerfile-armv7 +++ b/Dockerfile-armv7 @@ -2,10 +2,16 @@ FROM node:lts-alpine as builder COPY ./frontend . RUN npm install RUN npm run build -FROM python:3.7.10-stretch + +FROM python:3.7.10-stretch as pybuilder +WORKDIR /code +COPY ./backend /code/ +RUN pip install --user -r requirements.txt + +FROM python:3.7.10-slim-stretch as app +COPY --from=pybuilder /root/.local /root/.local +COPY --from=pybuilder /code /dist COPY --from=builder ./dist /dist/ -COPY ./backend /dist/ WORKDIR /dist -RUN pip install -r requirements.txt EXPOSE 5001 ENTRYPOINT ["python", "/dist/__init__.py"]