Cleanup dockerfile and add editorconfig
Updates dockerfile to use python 3.5 base image and reorders to take advantage of image layering caching better Removes some outdated and unused files adds .editorconfig file adds .vscode to gitignore Change-Id: I08571b7176f0cb9fab42f072326c6c14d86d518a
This commit is contained in:
parent
d5e21c4b18
commit
6cc7211630
27
.editorconfig
Normal file
27
.editorconfig
Normal file
@ -0,0 +1,27 @@
|
||||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.py]
|
||||
# Note: Undercloud components use PEP8 line length of 79
|
||||
# Note: for VS Code, set "editor.rulers":[79] in your workspace settings
|
||||
max_line_length = 79
|
||||
|
||||
[*.{yml,yaml}]
|
||||
indent_size = 2
|
||||
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
|
||||
[*.md]
|
||||
# Note: VS Code may not honor the following setting
|
||||
# See: https://github.com/editorconfig/editorconfig-vscode/issues/153
|
||||
trim_trailing_whitespace = false
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -110,3 +110,6 @@ AUTHORS
|
||||
/charts/shipyard/charts
|
||||
/charts/shipyard/requirements.lock
|
||||
.DS_Store
|
||||
|
||||
# vscode
|
||||
.vscode/
|
@ -12,69 +12,37 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM ubuntu:16.04
|
||||
FROM python:3.5
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV container docker
|
||||
ENV PORT 9000
|
||||
ENV LC_ALL C.UTF-8
|
||||
ENV LANG C.UTF-8
|
||||
|
||||
RUN set -x && \
|
||||
apt-get -qq update && \
|
||||
apt-get -y install \
|
||||
git \
|
||||
curl \
|
||||
netcat \
|
||||
netbase \
|
||||
python3 \
|
||||
python3-setuptools \
|
||||
python3-pip \
|
||||
python3-dev \
|
||||
python3-dateutil \
|
||||
ca-certificates \
|
||||
gcc \
|
||||
g++ \
|
||||
make \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
libpq-dev \
|
||||
--no-install-recommends \
|
||||
&& python3 -m pip install -U pip \
|
||||
&& apt-get clean \
|
||||
&& rm -rf \
|
||||
/var/lib/apt/lists/* \
|
||||
/tmp/* \
|
||||
/var/tmp/* \
|
||||
/usr/share/man \
|
||||
/usr/share/doc \
|
||||
/usr/share/doc-base
|
||||
# Expose port 9000 for application
|
||||
EXPOSE $PORT
|
||||
|
||||
# Execute entrypoint
|
||||
ENTRYPOINT ["/home/shipyard/entrypoint.sh"]
|
||||
CMD ["server"]
|
||||
|
||||
# Create shipyard user
|
||||
RUN useradd -ms /bin/bash shipyard
|
||||
|
||||
# Clone the shipyard repository
|
||||
COPY . /home/shipyard/shipyard
|
||||
|
||||
# Set work directory
|
||||
# Install dependency requirements and packages
|
||||
WORKDIR /home/shipyard/shipyard
|
||||
RUN pip3 install -r requirements.txt
|
||||
RUN python3 setup.py install
|
||||
|
||||
# Copy entrypoint.sh to /home/shipyard
|
||||
COPY entrypoint.sh /home/shipyard/entrypoint.sh
|
||||
|
||||
# Change permissions
|
||||
RUN chown -R shipyard: /home/shipyard \
|
||||
&& chmod +x /home/shipyard/entrypoint.sh
|
||||
|
||||
# Set work directory and install dependencies
|
||||
WORKDIR /home/shipyard/shipyard
|
||||
COPY requirements.txt /home/shipyard/shipyard
|
||||
RUN pip3 install -r requirements.txt
|
||||
|
||||
COPY . /home/shipyard/shipyard
|
||||
RUN python3 setup.py install
|
||||
|
||||
# Set user to shipyard
|
||||
USER shipyard
|
||||
|
||||
# Expose port 9000 for application
|
||||
EXPOSE 9000
|
||||
|
||||
# Execute entrypoint
|
||||
ENTRYPOINT ["/home/shipyard/entrypoint.sh"]
|
||||
|
||||
CMD ["server"]
|
||||
|
@ -1,12 +0,0 @@
|
||||
## Shipyard Airflow ##
|
||||
|
||||
A python REST workflow orchestrator
|
||||
|
||||
To run:
|
||||
|
||||
```
|
||||
$ virtualenv -p python3 /var/tmp/shipyard
|
||||
$ . /var/tmp/shipyard/bin/activate
|
||||
$ python setup.py install
|
||||
$ uwsgi --http :9000 -w shipyard_airflow.shipyard --callable shipyard -L
|
||||
```
|
@ -1,18 +0,0 @@
|
||||
[metadata]
|
||||
name = shipyard client
|
||||
summary = Shipyard client library and CLI
|
||||
description-file = README.md
|
||||
|
||||
author = undercloud team
|
||||
home-page = https://github.com/att-comdev/shipyard/shipyard_client
|
||||
classifier =
|
||||
Intended Audience :: Information Technology
|
||||
Intended Audience :: System Administrators
|
||||
License :: OSI Approved :: Apache Software License
|
||||
Operating System :: POSIX :: Linux
|
||||
Programming Language :: Python
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3.5
|
||||
|
||||
[build_sphinx]
|
||||
warning-is-error = True
|
Loading…
x
Reference in New Issue
Block a user