File tree 2 files changed +22
-10
lines changed
2 files changed +22
-10
lines changed Original file line number Diff line number Diff line change @@ -7,19 +7,26 @@ ENV STORAGE=/usr/lib/pypi-server
7
7
ENV PYPI_SERVER_SRC=/usr/local/src/pypi-server
8
8
9
9
RUN apk add --no-cache \
10
- py-mysqldb \
11
- py-psycopg2 \
10
+ libffi \
11
+ py-cparser \
12
12
py-curl \
13
+ py-lxml \
14
+ py-mysqldb \
13
15
py-openssl \
14
- py-cffi \
15
- py-cparser \
16
- py-lxml
16
+ py-psycopg2 \
17
+ py-setuptools
17
18
18
19
COPY ./ /tmp
19
20
20
21
RUN set -ex && \
21
- apk add --no-cache --virtual .build-deps gcc py-pip python-dev musl-dev && \
22
- pip --no-cache-dir install '/tmp' && \
22
+ apk add --no-cache --virtual .build-deps \
23
+ gcc \
24
+ libffi-dev \
25
+ musl-dev \
26
+ py-pip \
27
+ python-dev \
28
+ && \
29
+ pip --no-cache-dir install -U '/tmp' && \
23
30
apk del .build-deps
24
31
25
32
VOLUME "/usr/lib/pypi-server"
Original file line number Diff line number Diff line change @@ -33,17 +33,22 @@ def check_port(host, port):
33
33
if not args or args [0 ].startswith ('-' ):
34
34
db_url = parse_url (os .getenv ('DB' , '' ))
35
35
host = db_url .hostname
36
- port = int (db_url .port or DEFAULT_PORTS [db_url .scheme ])
36
+
37
+ if 'sqlite' in db_url .scheme .lower ():
38
+ port = None
39
+ else :
40
+ port = int (db_url .port or DEFAULT_PORTS [db_url .scheme ])
37
41
38
42
args .insert (0 , '/usr/bin/pypi-server' )
39
43
40
- while not check_port (db_url .hostname , port ):
44
+ while port and not check_port (db_url .hostname , port ):
41
45
log .info ('Awaiting database...' )
42
46
sleep (1 )
43
47
continue
44
48
45
49
# Ensure database engine is ready
46
- sleep (5 )
50
+ if port :
51
+ sleep (5 )
47
52
48
53
executable = args [0 ]
49
54
You can’t perform that action at this time.
0 commit comments