3
This commit is contained in:
parent
2ffcb8ede8
commit
5bb76f5204
@ -1,8 +1,17 @@
|
||||
ARG ALPINE_VERSION=3.18
|
||||
|
||||
FROM alpine:${ALPINE_VERSION} as alpine
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
|
||||
RUN apk add --no-cache openssl nginx bash tzdata ca-certificates
|
||||
FROM alpine:${ALPINE_VERSION}
|
||||
|
||||
RUN echo OK && apk update
|
||||
|
||||
RUN apk add --no-cache openssl nginx bash tzdata ca-certificates wget tar
|
||||
|
||||
RUN wget https://git.ngtech.co.il/NgTech-LTD/js-dos-pack/archive/master.tar.gz -O /tmp/master.tar.gz && \
|
||||
tar xvf /tmp/master.tar.gz -C /var/lib/nginx/html/ && \
|
||||
rm -vf /tmp/master.tar.gz
|
||||
|
||||
COPY default.conf /etc/nginx/http.d/default.conf
|
||||
|
||||
@ -11,6 +20,6 @@ COPY scripts/start.sh /start.sh
|
||||
|
||||
WORKDIR /
|
||||
|
||||
RUN chmod +x /start.sh
|
||||
RUN chmod +x /start.sh && rm -vf /var/lib/nginx/html/index.html
|
||||
|
||||
CMD ["/start.sh"]
|
||||
|
22
docker/nginx/Dockerfile.alpine
Normal file
22
docker/nginx/Dockerfile.alpine
Normal file
@ -0,0 +1,22 @@
|
||||
ARG ALPINE_VERSION=3.18
|
||||
|
||||
FROM alpine:${ALPINE_VERSION}
|
||||
|
||||
RUN echo OK && apk update
|
||||
|
||||
RUN apk add --no-cache openssl nginx bash tzdata ca-certificates wget tar
|
||||
|
||||
RUN wget https://git.ngtech.co.il/NgTech-LTD/js-dos-pack/archive/master.tar.gz -O /tmp/master.tar.gz && \
|
||||
tar xvf /tmp/master.tar.gz -C /var/lib/nginx/html/ && \
|
||||
rm -vf /tmp/master.tar.gz
|
||||
|
||||
COPY default.conf /etc/nginx/http.d/default.conf
|
||||
|
||||
COPY scripts/gen-self-signed-cert.sh /gen-self-signed-cert.sh
|
||||
COPY scripts/start.sh /start.sh
|
||||
|
||||
WORKDIR /
|
||||
|
||||
RUN chmod +x /start.sh && rm -vf /var/lib/nginx/html/index.html
|
||||
|
||||
CMD ["/start.sh"]
|
22
docker/nginx/Dockerfile.debian
Normal file
22
docker/nginx/Dockerfile.debian
Normal file
@ -0,0 +1,22 @@
|
||||
ARG DEBIAN_VERSION=12
|
||||
|
||||
FROM debian:${DEBIAN_VERSION}
|
||||
|
||||
RUN echo OK && apt update
|
||||
|
||||
RUN apt install -y openssl nginx bash tzdata ca-certificates wget tar
|
||||
|
||||
RUN wget https://git.ngtech.co.il/NgTech-LTD/js-dos-pack/archive/master.tar.gz -O /tmp/master.tar.gz && \
|
||||
tar xvf /tmp/master.tar.gz -C /var/lib/nginx/html/ && \
|
||||
rm -vf /tmp/master.tar.gz
|
||||
|
||||
COPY default.conf /etc/nginx/http.d/default.conf
|
||||
|
||||
COPY scripts/gen-self-signed-cert.sh /gen-self-signed-cert.sh
|
||||
COPY scripts/start.sh /start.sh
|
||||
|
||||
WORKDIR /
|
||||
|
||||
RUN chmod +x /start.sh && rm -vf /var/lib/nginx/html/index.html
|
||||
|
||||
CMD ["/start.sh"]
|
@ -2,3 +2,32 @@ all:
|
||||
echo OK
|
||||
build:
|
||||
podman build -t nginx-self-signed .
|
||||
run:
|
||||
podman run -d --rm -p 10080:80 -p 10443:443 nginx-self-signed
|
||||
|
||||
build-multi:
|
||||
podman buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t nginx-games .
|
||||
# podman buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t nginx-self-signed .
|
||||
|
||||
|
||||
build-armv7:
|
||||
podman buildx build --platform linux/arm/v7 -t nginx-games:latest-armv7 .
|
||||
|
||||
buildkit:
|
||||
podman run -d --name buildkitd --privileged docker.io/moby/buildkit:latest
|
||||
|
||||
all: init-buildx publish
|
||||
|
||||
publish:
|
||||
bash publish.sh
|
||||
|
||||
init-buildx: clean-buildx
|
||||
docker buildx create --name mybuilder
|
||||
docker buildx use mybuilder
|
||||
docker buildx inspect --bootstrap
|
||||
docker buildx ls
|
||||
|
||||
clean-buildx:
|
||||
docker buildx rm mybuilder;true
|
||||
|
||||
|
||||
|
1
docker/nginx/container-name
Normal file
1
docker/nginx/container-name
Normal file
@ -0,0 +1 @@
|
||||
nginx-games
|
@ -8,6 +8,10 @@ server {
|
||||
|
||||
# Everything is a 404
|
||||
location / {
|
||||
autoindex on;
|
||||
autoindex_exact_size off;
|
||||
autoindex_format html;
|
||||
autoindex_localtime on;
|
||||
root /var/lib/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
11
docker/nginx/publish.sh
Normal file
11
docker/nginx/publish.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
|
||||
name="$(head -1 container-name)"
|
||||
docker_username="$(head -1 username)"
|
||||
|
||||
docker login
|
||||
docker buildx build -t "${docker_username}/${name}:latest" --platform linux/amd64,linux/arm64,linux/arm/v7 --push .
|
||||
|
||||
set +x
|
1
docker/nginx/username
Normal file
1
docker/nginx/username
Normal file
@ -0,0 +1 @@
|
||||
elicro
|
Loading…
Reference in New Issue
Block a user