1 # ================================================================================
2 # Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.
3 # ================================================================================
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 # ============LICENSE_END=========================================================
21 ENV APPUSER oti_handler
22 ENV HOME ${INSROOT}/${APPUSER}
24 RUN useradd -d ${HOME} ${APPUSER}
34 COPY ./otihandler/ ./otihandler/
36 COPY create_schema.sql /tmp/create_schema.sql
38 RUN mkdir -p ${HOME}/logs \
39 && chown -R ${APPUSER}:${APPUSER} ${HOME} \
40 && chmod 500 ${HOME}/etc \
41 && chmod 500 ${HOME}/*.sh \
43 && pip install -r requirements.txt
46 && apt-get -y --allow-unauthenticated install vim-tiny \
47 && apt-get -y --allow-unauthenticated install dos2unix \
48 && apt-get -y --allow-unauthenticated install postgresql \
49 && dos2unix /tmp/create_schema.sql \
51 && chmod 777 /tmp/create_schema.sql
57 ENTRYPOINT ["./run.sh"]