50 lines
1.8 KiB
Plaintext
50 lines
1.8 KiB
Plaintext
#---------------------------------------------------------------------------
|
|
# Copyright IBM Corp. 2015, 2015 All Rights Reserved
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# Limitations under the License.
|
|
#---------------------------------------------------------------------------
|
|
|
|
FROM {{ inventory_hostname }}:{{ docker_registry_port }}/{{base_os_image}}_jre8
|
|
|
|
MAINTAINER {{ base_image_maintainer }}
|
|
|
|
# Create swift user/group
|
|
RUN [ "groupadd", "-g", "{{ swift_group_id }}", "swift" ]
|
|
RUN [ "useradd", "-u" , "{{ swift_user_id }}", "-g", "{{ swift_group_id }}", "swift" ]
|
|
|
|
# Copy files
|
|
COPY ["logback.xml", "init_container.sh", "/opt/storlets/"]
|
|
|
|
RUN ["chmod", "0744", "/opt/storlets/logback.xml"]
|
|
RUN ["chmod", "0755", "/opt/storlets/init_container.sh"]
|
|
|
|
# Install c java resources
|
|
COPY ["libsbus.so", "/usr/local/lib/storlets/"]
|
|
|
|
# Install storlets java resources
|
|
COPY ["SBusJavaFacade.jar", "libjsbus.so", "SDaemon.jar", "SCommon.jar", "/opt/storlets/"]
|
|
|
|
# Install pip
|
|
COPY ["get-pip.py", "/opt/storlets"]
|
|
RUN ["python", "/opt/storlets/get-pip.py"]
|
|
ENV PYTHONWARNINGS="ignore:a true SSLContext object"
|
|
|
|
# Install python codes
|
|
COPY ["storlets", "/opt/storlets/"]
|
|
RUN cd /opt/storlets/ && \
|
|
pip install -r requirements.txt && \
|
|
python setup.py install
|
|
|
|
CMD ["prod", "/mnt/channels/factory_pipe", "DEBUG"]
|
|
|
|
ENTRYPOINT ["/opt/storlets/init_container.sh"]
|