separate builds

This commit is contained in:
Alberto Xamin 2021-06-26 11:25:19 +02:00
parent 35315516e3
commit 57e18a1121
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
3 changed files with 23 additions and 2 deletions

View File

@ -28,10 +28,20 @@ jobs:
docker buildx build \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--cache-to "type=local,dest=/tmp/.buildx-cache" \
--platform linux/amd64,linux/arm/v7,linux/arm64 \
--platform linux/amd64,linux/arm64 \
--output "type=image,push=false" \
--tag albertoxamin/bang:dev \
--file ./Dockerfile ./
-
name: Docker Buildx (build)
run: |
docker buildx build \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--cache-to "type=local,dest=/tmp/.buildx-cache" \
--platform linux/arm/v7 \
--output "type=image,push=false" \
--tag albertoxamin/bang:dev \
--file ./Dockerfile-armv7 ./
-
name: Login to DockerHub
uses: docker/login-action@v1

View File

@ -2,7 +2,7 @@ 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-slim-stretch
COPY --from=builder ./dist /dist/
COPY ./backend /dist/
WORKDIR /dist

11
Dockerfile-armv7 Normal file
View File

@ -0,0 +1,11 @@
FROM node:lts-alpine as builder
COPY ./frontend .
RUN npm install
RUN npm run build
FROM python:3.7.10-stretch
COPY --from=builder ./dist /dist/
COPY ./backend /dist/
WORKDIR /dist
RUN pip install -r requirements.txt
EXPOSE 5001
ENTRYPOINT ["python", "/dist/__init__.py"]