-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into build_fixes_target
- Loading branch information
Showing
1 changed file
with
40 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,40 @@ | ||
# This dockerfile is for development purposes only; do not use this for production deployments | ||
# This file exists due to changes introduced in https://github.com/opencost/opencost/pull/2502 | ||
# Tilt cannot reference files that exist outside of this ./ui folder so the reference to THIRD_PARTY_LICENSES.txt is removed | ||
FROM nginx:alpine | ||
|
||
LABEL org.opencontainers.image.description="Cross-cloud cost allocation models for Kubernetes workloads" | ||
LABEL org.opencontainers.image.documentation=https://opencost.io/docs/ | ||
LABEL org.opencontainers.image.licenses=Apache-2.0 | ||
LABEL org.opencontainers.image.source=https://github.com/opencost/opencost | ||
LABEL org.opencontainers.image.title=opencost-ui | ||
LABEL org.opencontainers.image.url=https://opencost.io | ||
|
||
ARG version=dev | ||
ARG commit=HEAD | ||
ENV VERSION=${version} | ||
ENV HEAD=${commit} | ||
|
||
ENV API_PORT=9003 | ||
ENV API_SERVER=0.0.0.0 | ||
ENV UI_PORT=9090 | ||
|
||
COPY ./dist /opt/ui/dist | ||
COPY default.nginx.conf.template /etc/nginx/conf.d/default.nginx.conf.template | ||
COPY nginx.conf /etc/nginx/ | ||
COPY ./docker-entrypoint.sh /usr/local/bin/ | ||
RUN mkdir -p /var/www | ||
|
||
RUN rm -rf /etc/nginx/conf.d/default.conf | ||
|
||
RUN adduser 1001 -g 1000 -D | ||
RUN chown 1001:1000 -R /var/www | ||
RUN chown 1001:1000 -R /etc/nginx | ||
RUN chown 1001:1000 -R /usr/local/bin/docker-entrypoint.sh | ||
|
||
ENV BASE_URL=/model | ||
|
||
USER 1001 | ||
|
||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] | ||
CMD ["nginx", "-g", "daemon off;"] |