Skip to content

Commit 989791e

Browse files
Merge pull request #139 from rhoerbe/rh_docker_cmd
replace ENTRYPOINT with CMD; EXPOSE port; + apt-get clean
2 parents 91d0f6e + dc3f853 commit 989791e

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,19 @@ RUN apt-get update && \
1010
libffi-dev \
1111
libssl-dev \
1212
xmlsec1 \
13-
libyaml-dev
13+
libyaml-dev && \
14+
apt-get clean
1415

1516
RUN mkdir -p /src/satosa
1617
COPY . /src/satosa
1718
COPY docker/setup.sh /setup.sh
18-
RUN /setup.sh
19-
2019
COPY docker/start.sh /start.sh
20+
RUN chmod +x /setup.sh /start.sh \
21+
&& /setup.sh
22+
2123
COPY docker/attributemaps /opt/satosa/attributemaps
2224

2325
VOLUME /opt/satosa/etc
24-
ENTRYPOINT ["/start.sh"]
26+
CMD ["/start.sh"]
27+
ARG PROXY_PORT=8000
28+
EXPOSE $PROXY_PORT

scripts/start_proxy.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import re
2+
import sys
3+
4+
from gunicorn.app.wsgiapp import run
5+
6+
print('\n'.join(sys.path))
7+
# use this entrypoint to start the proxy from the IDE
8+
9+
if __name__ == '__main__':
10+
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
11+
sys.exit(run())
12+

0 commit comments

Comments
 (0)