Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# https://editorconfig.org/

root = true

[*]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf
charset = utf-8

# Docstrings and comments use max_line_length = 79
[*.py]
max_line_length = 119
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
/*.egg
build
tmp
README.rst
README.rst
/venv/
.idea
16 changes: 10 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
FROM alpine:3.3
FROM alpine:3.11
MAINTAINER think@hotmail.de

ENV PYTHONUNBUFFERED=1

RUN \
apk add --no-cache python3 && \
apk add --no-cache --virtual=build-dependencies wget ca-certificates && \
wget "https://bootstrap.pypa.io/get-pip.py" -O /dev/stdout | python3 && \
apk del build-dependencies
apk add --no-cache python3 && \
if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python ; fi && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --no-cache --upgrade pip setuptools wheel && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi

RUN pip install --no-cache-dir ruamel.yaml

COPY bin /bin
COPY compose_format /usr/lib/python3.5/site-packages/compose_format
COPY compose_format /usr/lib/python3.8/site-packages/compose_format

RUN chmod +x /bin/compose_format

Expand Down
1 change: 0 additions & 1 deletion bin/compose_format
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python3
from compose_format import ComposeFormat


if __name__ == '__main__':

import argparse
Expand Down
8 changes: 6 additions & 2 deletions compose_format/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ class ComposeFormat:
'interval', 'timeout', 'retries',
'disable',
]
BUILD_ORDER = ['context', 'dockerfile', 'args']

BUILD_ORDER = [
'context',
'dockerfile',
'target',
'args'
]
ORDERS = {
'version': TOPLEVEL_ORDER,
'services': TOPLEVEL_ORDER,
Expand Down