[main]: fix Dockerfile
Build and Push Docker Image / build (push) Failing after 24m7s

This commit is contained in:
John Gatward
2026-08-04 20:26:46 +01:00
parent 104b90ad4f
commit c7dedf471d
2 changed files with 19 additions and 7 deletions
+16 -4
View File
@@ -3,6 +3,10 @@ name: Build and Push Docker Image
on: on:
push: push:
branches: [ "main" ] branches: [ "main" ]
workflow_dispatch:
env:
IMAGE_NAME: gitea.umbra.mom/ciaran/football-competitiveness
jobs: jobs:
build: build:
@@ -21,10 +25,18 @@ jobs:
-u "$REGISTRY_USER" \ -u "$REGISTRY_USER" \
--password-stdin --password-stdin
- name: Build image - name: Set up buildx
run: | run: |
docker build -t gitea.umbra.mom/ciaran/football-competitiveness:latest . docker buildx create --name ci-builder --driver docker-container --use || docker buildx use ci-builder
docker buildx inspect --bootstrap
- name: Push image - name: Build and push image (with cache)
run: | run: |
docker push gitea.umbra.mom/ciaran/football-competitiveness:latest docker buildx build \
--pull \
--platform linux/amd64 \
-t "${IMAGE_NAME}:latest" \
--cache-from "type=registry,ref=${IMAGE_NAME}:buildcache" \
--cache-to "type=registry,ref=${IMAGE_NAME}:buildcache,mode=max" \
--push \
.
+3 -3
View File
@@ -22,11 +22,11 @@ COPY . /srv/shiny-server/
# Prevent renv attempting to use pak # Prevent renv attempting to use pak
ENV RENV_CONFIG_PAK_ENABLED=FALSE ENV RENV_CONFIG_PAK_ENABLED=FALSE
ENV CFLAGS=-Wno-error=format-security
# Install renv and restore project packages # Install renv and restore project packages
RUN R -e "install.packages('renv', repos='https://cran.rstudio.com'); \ RUN R --vanilla -e "install.packages('renv', repos='https://cran.rstudio.com')" && \
renv::init(bare = TRUE); \ R --vanilla -e "renv::restore(project='/srv/shiny-server', lockfile='/srv/shiny-server/renv.lock', prompt=FALSE)"
renv::restore(prompt = FALSE)"
# Permissions # Permissions
RUN chown -R shiny:shiny /srv/shiny-server RUN chown -R shiny:shiny /srv/shiny-server