-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
572 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,41 @@ | ||
FROM six8/pyinstaller-alpine:latest | ||
FROM quay.io/appr/appr:base | ||
|
||
ENV workdir /opt/appr-server | ||
RUN mkdir -p $workdir | ||
RUN apk --no-cache --update add python py-pip openssl ca-certificates | ||
RUN apk --no-cache --update add --virtual build-dependencies \ | ||
python-dev build-base wget openssl-dev libffi-dev | ||
ADD . $workdir | ||
python-dev build-base wget openssl-dev libffi-dev libstdc++ | ||
COPY . $workdir | ||
WORKDIR $workdir | ||
|
||
RUN pip install pip -U \ | ||
&& pip install gunicorn -U && pip install -e . | ||
RUN pip install jsonnet | ||
RUN pip install -e . | ||
|
||
RUN /pyinstaller/pyinstaller.sh --onefile --noconfirm \ | ||
--add-data "appr/jsonnet/:appr/jsonnet" \ | ||
--onefile \ | ||
--hidden-import _jsonnet \ | ||
--log-level DEBUG \ | ||
--clean \ | ||
bin/appr | ||
|
||
|
||
from alpine:latest | ||
ARG with_kubectl=false | ||
ENV HOME=/appr | ||
RUN mkdir -p /opt/bin && mkdir -p /opt/bin/k8s && mkdir $HOME && mkdir -p $HOME/local | ||
ENV PATH=${PATH}:/opt/bin:/opt/bin/k8s | ||
RUN apk --no-cache add ca-certificates | ||
COPY --from=0 /opt/appr-server/dist/appr /usr/bin/ | ||
ENV WITH_KUBECTL ${with_kubectl} | ||
RUN if [ "$WITH_KUBECTL" = true ]; then \ | ||
apk add --update curl && rm -rf /var/cache/apk/* \ | ||
&& curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl \ | ||
&& chmod +x ./kubectl \ | ||
&& cp ./kubectl /opt/bin/k8s; \ | ||
fi | ||
|
||
WORKDIR /appr/local | ||
|
||
COPY --from=0 /opt/appr-server/dist/appr /opt/bin | ||
RUN appr plugins install helm | ||
|
||
ENTRYPOINT ["appr"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM six8/pyinstaller-alpine:apline-v3.4-pyinstaller-develop | ||
|
||
ENV workdir /opt/appr-server | ||
RUN mkdir -p $workdir | ||
RUN apk --no-cache --update add python py-pip openssl ca-certificates git curl | ||
RUN apk --no-cache --update add --virtual build-dependencies \ | ||
python-dev build-base wget openssl-dev libffi-dev libstdc++ | ||
COPY . $workdir | ||
WORKDIR $workdir | ||
|
||
RUN pip install pip -U \ | ||
&& pip install -r requirements_dev.txt \ | ||
&& pip install -e . | ||
|
Oops, something went wrong.