fix: docker build process

This commit is contained in:
Dan Ditomaso
2025-03-29 15:54:15 -04:00
parent a378cce0be
commit 0de24c41ed
7 changed files with 61 additions and 14 deletions

View File

@@ -1,2 +0,0 @@
dist/build.tar
dist/output

View File

@@ -46,7 +46,7 @@ jobs:
uses: redhat-actions/buildah-build@v2
with:
containerfiles: |
./Containerfile
./infra/Containerfile
image: ${{github.event.repository.full_name}}
tags: nightly ${{ github.sha }}
oci: true

View File

@@ -46,7 +46,7 @@ jobs:
uses: redhat-actions/buildah-build@v2
with:
containerfiles: |
./Containerfile
./infra/Containerfile
image: ${{github.event.repository.full_name}}
tags: latest ${{ github.sha }}
oci: true

View File

@@ -1,10 +0,0 @@
FROM nginx:1.27.2-alpine
RUN rm -r /usr/share/nginx/html \
&& mkdir /usr/share/nginx/html
WORKDIR /usr/share/nginx/html
ADD dist .
CMD nginx -g "daemon off;"

2
infra/.dockerignore Normal file
View File

@@ -0,0 +1,2 @@
../dist/build.tar
../dist/output

15
infra/Containerfile Normal file
View File

@@ -0,0 +1,15 @@
FROM nginx:1.27-alpine
RUN rm -r /usr/share/nginx/html \
&& mkdir -p /usr/share/nginx/html \
&& mkdir -p /etc/nginx/conf.d
WORKDIR /usr/share/nginx/html
ADD dist .
COPY ./infra/default.conf /etc/nginx/conf.d/default.conf
EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]

42
infra/default.conf Normal file
View File

@@ -0,0 +1,42 @@
server {
listen 8080;
server_name localhost;
root /usr/share/nginx/html;
index index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
internal;
}
location ~ /\.ht {
deny all;
}
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types
text/plain
text/css
text/xml
text/javascript
application/javascript
application/x-javascript
application/json
application/xml
application/xml+rss
font/ttf
font/otf
image/svg+xml;
}