Merge pull request '[DO-1579] start project' (#1) from feature/DO-1579/add_image into master
Reviewed-on: https://git.avroid.tech/Docker/nginx/pulls/1 Reviewed-by: Denis Patrakeev <denis.patrakeev@avroid.team>
This commit is contained in:
29
.gitea/workflows/check-license.yml
Normal file
29
.gitea/workflows/check-license.yml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# Copyright Avroid, Ltd. 2023-2024
|
||||||
|
#
|
||||||
|
# You can not use the contents of the file in any way without
|
||||||
|
# AVROID, Ltd. written permission.
|
||||||
|
#
|
||||||
|
# To obtain such a permit, you should contact AVROID, Ltd.
|
||||||
|
# at https://avroid.ru
|
||||||
|
|
||||||
|
---
|
||||||
|
name: Check license
|
||||||
|
run-name: ${{ gitea.actor }} is start check sources
|
||||||
|
on: [pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
scan-secrets:
|
||||||
|
name: Check license
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: harbor.avroid.tech/devops/node:20-alpine3.19-0
|
||||||
|
steps:
|
||||||
|
- run: echo "Start job on ${{ runner.name }} with os ${{ runner.os }}"
|
||||||
|
- run: echo "Work with branch ${{ gitea.ref }} repository ${{ gitea.repository }}"
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: https://git-mirrors.avroid.tech/Mirrors-actions/checkout.git@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # for work tj-actions/changed-files
|
||||||
|
persist-credentials: false # for work tj-actions/changed-files
|
||||||
|
- name: Check license
|
||||||
|
uses: https://gitea:${{ secrets.CI_TOKEN }}@git.avroid.tech/Actions/addlicense-docker-action.git@v1
|
||||||
7
CHANGELOG.md
Normal file
7
CHANGELOG.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [05.02.2025] - node:1.27.3-alpine3.20
|
||||||
|
|
||||||
|
ADD:
|
||||||
|
|
||||||
|
* nginx-1.27.3-alpine3.20
|
||||||
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# Copyright Avroid, Ltd. 2023-2025
|
||||||
|
#
|
||||||
|
# You can not use the contents of the file in any way without
|
||||||
|
# AVROID, Ltd. written permission.
|
||||||
|
#
|
||||||
|
# To obtain such a permit, you should contact AVROID, Ltd.
|
||||||
|
# at https://avroid.ru
|
||||||
|
|
||||||
|
ARG DOCKER_REGISTRY=harbor.avroid.tech/docker-hub-proxy/library
|
||||||
|
|
||||||
|
ARG IMAGE_TAG=""
|
||||||
|
|
||||||
|
FROM ${DOCKER_REGISTRY}/nginx:${IMAGE_TAG}
|
||||||
|
|
||||||
|
LABEL description="Nginx rootless"
|
||||||
|
|
||||||
|
LABEL app.nginx.version="${IMAGE_TAG}"
|
||||||
|
|
||||||
|
COPY rootfs /
|
||||||
|
|
||||||
|
RUN ln -s /dev/stderr /tmp/error.log \
|
||||||
|
&& ln -s /dev/stdout /tmp/access.log
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
USER nginx
|
||||||
33
Makefile
Normal file
33
Makefile
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
.PHONY: all build push clean
|
||||||
|
|
||||||
|
IMAGE_NAME = nginx
|
||||||
|
IMAGE_GROUP = devops
|
||||||
|
IMAGE_TAG = 1.27.3-alpine3.20
|
||||||
|
REVISION =
|
||||||
|
DOCKER_REGISTRY = harbor.avroid.tech
|
||||||
|
|
||||||
|
all:
|
||||||
|
@echo 'DEFAULT:'
|
||||||
|
@echo ' make build'
|
||||||
|
@echo ' make push'
|
||||||
|
@echo ' make getTag'
|
||||||
|
@echo ' make clean'
|
||||||
|
|
||||||
|
build:
|
||||||
|
DOCKER_BUILDKIT=1 docker build \
|
||||||
|
-f Dockerfile \
|
||||||
|
--platform linux/amd64 \
|
||||||
|
--build-arg IMAGE_TAG=$(IMAGE_TAG) \
|
||||||
|
-t $(DOCKER_REGISTRY)/$(IMAGE_GROUP)/$(IMAGE_NAME):$(IMAGE_TAG)$(REVISION) .
|
||||||
|
|
||||||
|
push:
|
||||||
|
ifeq ($(CI), false)
|
||||||
|
docker login https://$(DOCKER_REGISTRY)
|
||||||
|
endif
|
||||||
|
docker push $(DOCKER_REGISTRY)/$(IMAGE_GROUP)/$(IMAGE_NAME):$(IMAGE_TAG)$(REVISION)
|
||||||
|
|
||||||
|
getTag:
|
||||||
|
@echo $(IMAGE_TAG)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker rmi $(DOCKER_REGISTRY)/$(IMAGE_GROUP)/$(IMAGE_NAME):$(IMAGE_TAG)$(REVISION)
|
||||||
27
README.md
27
README.md
@@ -1,2 +1,29 @@
|
|||||||
# nginx
|
# nginx
|
||||||
|
|
||||||
|
## Данный репозиторий используется как основа для остальных репозиториев
|
||||||
|
|
||||||
|
Для сборки образа выполните
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make build
|
||||||
|
```
|
||||||
|
|
||||||
|
Для загрузки образа в harbor выполните
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make push
|
||||||
|
```
|
||||||
|
|
||||||
|
Для вывода тега докер образа выполните
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make getTag
|
||||||
|
```
|
||||||
|
|
||||||
|
Для удаления образа из системы выполните
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make clean
|
||||||
|
```
|
||||||
|
|
||||||
|
За версию докер образа отвечает переменная IMAGE_TAG в [Makefile](./Makefile#L5)
|
||||||
|
|||||||
9
rootfs/etc/nginx/conf.d/default.conf
Normal file
9
rootfs/etc/nginx/conf.d/default.conf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
server {
|
||||||
|
listen 8080;
|
||||||
|
server_name localhost;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /srv;
|
||||||
|
index index.html index.htm;
|
||||||
|
}
|
||||||
|
}
|
||||||
35
rootfs/etc/nginx/nginx.conf
Normal file
35
rootfs/etc/nginx/nginx.conf
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
user nginx;
|
||||||
|
worker_processes auto;
|
||||||
|
|
||||||
|
error_log /tmp/error.log notice;
|
||||||
|
pid /tmp/nginx.pid;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
client_body_temp_path /tmp/client_temp;
|
||||||
|
proxy_temp_path /tmp/proxy_temp_path;
|
||||||
|
fastcgi_temp_path /tmp/fastcgi_temp;
|
||||||
|
uwsgi_temp_path /tmp/uwsgi_temp;
|
||||||
|
scgi_temp_path /tmp/scgi_temp;
|
||||||
|
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
|
||||||
|
access_log /tmp/access.log main;
|
||||||
|
|
||||||
|
sendfile on;
|
||||||
|
#tcp_nopush on;
|
||||||
|
|
||||||
|
keepalive_timeout 65;
|
||||||
|
|
||||||
|
#gzip on;
|
||||||
|
|
||||||
|
include /etc/nginx/conf.d/*.conf;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user