Skip to content

Commit 0692726

Browse files
committed
Removed passwd authentication and fixed issue with docker push
1 parent fc7f604 commit 0692726

File tree

8 files changed

+42
-59
lines changed

8 files changed

+42
-59
lines changed
File renamed without changes.

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

docker-compose.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,11 @@ version: "3.7"
22
services:
33
auth:
44
build: ./nginx
5-
image: aussume_nginx_auth
5+
image: registry_nginx_proxy
66
ports:
7-
- 5001:80
7+
- 5000:5000
88
links:
99
- registry
10-
environment:
11-
USER: "<YourUserName>"
12-
PASS: "<YourPassword>"
13-
# depends_on:
14-
# - registry
1510

1611
registry:
1712
image: registry:latest
18-

nginx/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ RUN apt-get update -y \
55
apache2-utils \
66
&& rm -rf /var/lib/apt/lists/*
77

8-
ENV FORWARD_PORT=80
8+
ENV FORWARD_PORT=5000
99

1010
WORKDIR /opt
1111

1212
#RUN apk add --no-cache gettext
1313

14-
COPY auth.conf auth.htpasswd launch.sh ./
14+
COPY nginx.conf auth.conf launch.sh ./
1515

1616
RUN chmod 0755 ./launch.sh
1717

nginx/auth.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
server {
2-
listen *:80 default_server;
2+
listen *:5000 default_server;
33
return 444;
44
}
55

66
server {
7-
listen *:80;
7+
listen *:5000;
88
server_name 127.0.0.1;
99

1010
location / {

nginx/launch.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
#!/bin/sh
22

3-
43
envsubst < auth.conf > /etc/nginx/conf.d/auth.conf
5-
envsubst < auth.htpasswd > /etc/nginx/auth.htpasswd
6-
7-
htpasswd -c -b /etc/nginx/auth.htpasswd $USER $PASS
8-
9-
echo basic-auth-pwd
10-
cat /etc/nginx/auth.htpasswd
4+
envsubst < nginx.conf > /etc/nginx/nginx.conf
115

126
nginx -g "daemon off;"

nginx/nginx.conf

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
user nginx;
3+
worker_processes 1;
4+
5+
error_log /var/log/nginx/error.log warn;
6+
pid /var/run/nginx.pid;
7+
8+
9+
events {
10+
worker_connections 1024;
11+
}
12+
13+
14+
http {
15+
include /etc/nginx/mime.types;
16+
default_type application/octet-stream;
17+
18+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
19+
'$status $body_bytes_sent "$http_referer" '
20+
'"$http_user_agent" "$http_x_forwarded_for"';
21+
22+
access_log /var/log/nginx/access.log main;
23+
24+
sendfile on;
25+
#tcp_nopush on;
26+
27+
keepalive_timeout 65;
28+
29+
#gzip on;
30+
31+
# disable client body size check
32+
client_max_body_size 0;
33+
34+
include /etc/nginx/conf.d/*.conf;
35+
}

0 commit comments

Comments
 (0)