-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from Jaydee94/dockerfile-refactor
Refactor Dockerfiles
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM abihf/wget:latest AS kubeseal-downloader | ||
RUN wget https://github.com/bitnami-labs/sealed-secrets/releases/download/v0.11.0/kubeseal-linux-amd64 && \ | ||
mv kubeseal-linux-amd64 /tmp/kubeseal | ||
|
||
FROM python:3.8-alpine3.12 | ||
|
||
ENV PORT 5000 | ||
ENV HOST 0.0.0.0 | ||
|
||
RUN mkdir /kubeseal-webgui | ||
COPY --from=kubeseal-downloader /tmp/kubeseal /kubeseal-webgui | ||
|
||
COPY api/ /kubeseal-webgui/ | ||
RUN chown -R 1001:1001 /kubeseal-webgui && \ | ||
chmod +x /kubeseal-webgui/kubeseal | ||
|
||
WORKDIR /kubeseal-webgui | ||
RUN pip install -r requirements.txt | ||
|
||
USER 1001 | ||
|
||
RUN pytest -m "not cluster" | ||
|
||
CMD [ "sh", "-c", "flask run --port $PORT --host $HOST" ] |
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,9 @@ | ||
FROM node:lts-alpine AS ui-build-stage | ||
COPY ui/ /ui | ||
WORKDIR /ui | ||
RUN npm install && npm run build | ||
|
||
FROM nginx:stable-alpine as ui-production-stage | ||
COPY --from=ui-build-stage /ui/dist /usr/share/nginx/html | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] |