Skip to content

Commit 00009e9

Browse files
committed
Dockerfile for Shipyard
Update Shipyard Dockerfiles
1 parent 72278bf commit 00009e9

File tree

4 files changed

+107
-0
lines changed

4 files changed

+107
-0
lines changed

shipyard/Dockerfile

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Copyright 2017 AT&T Intellectual Property. All other rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
FROM ubuntu:16.04
16+
17+
ENV DEBIAN_FRONTEND noninteractive
18+
ENV container docker
19+
20+
# Shipyard
21+
ARG SHIPYARD_HOME=/home/shipyard
22+
23+
RUN apt-get -qq update && \
24+
apt-get -y install \
25+
git \
26+
curl \
27+
netcat \
28+
netbase \
29+
python \
30+
python-setuptools \
31+
python-pip \
32+
python-dev \
33+
ca-certificates \
34+
gcc \
35+
g++ \
36+
make \
37+
libffi-dev \
38+
libssl-dev \
39+
--no-install-recommends \
40+
&& pip install --upgrade pip \
41+
&& pip install falcon \
42+
&& pip install requests \
43+
&& pip install uwsgi \
44+
&& pip install configparser \
45+
&& pip install python-openstackclient==3.11.0 \
46+
&& apt-get clean \
47+
&& rm -rf \
48+
/var/lib/apt/lists/* \
49+
/tmp/* \
50+
/var/tmp/* \
51+
/usr/share/man \
52+
/usr/share/doc \
53+
/usr/share/doc-base
54+
55+
# Create shipyard user
56+
RUN useradd -ms /bin/bash shipyard
57+
58+
# Clone the shipyard repository
59+
RUN git clone https://github.com/att-comdev/shipyard.git ${SHIPYARD_HOME}/shipyard
60+
61+
# Copy entrypoint.sh to /home/shipyard
62+
COPY entrypoint.sh ${SHIPYARD_HOME}/entrypoint.sh
63+
64+
# Copy shipyard.conf to /home/shipyard
65+
COPY shipyard.conf ${SHIPYARD_HOME}/shipyard.conf
66+
67+
# Change permissions
68+
RUN chown -R shipyard: ${SHIPYARD_HOME} \
69+
&& chmod +x ${SHIPYARD_HOME}/entrypoint.sh
70+
71+
# Expose port 9000 for application
72+
EXPOSE 9000
73+
74+
# Set work directory
75+
USER shipyard
76+
WORKDIR ${SHIPYARD_HOME}/shipyard
77+
78+
# Execute entrypoint
79+
ENTRYPOINT ["/home/shipyard/entrypoint.sh"]
80+

shipyard/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Shipyard ##
2+
3+
Shipyard dockerfiles
4+

shipyard/entrypoint.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
#
3+
# Copyright 2017 AT&T Intellectual Property. All other rights reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
18+
# Start shipyard application
19+
/usr/local/bin/uwsgi --http :9000 -w shipyard_airflow.shipyard --callable shipyard --enable-threads -L
20+

shipyard/shipyard.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[BASE]
2+
WEB_SERVER=http://localhost:32080
3+

0 commit comments

Comments
 (0)