Explorar o código

tilt - fix missing oracle and third party license files

Signed-off-by: Steven <saweber@gmail.com>
Steven %!s(int64=2) %!d(string=hai) anos
pai
achega
ec3d7214d5
Modificáronse 3 ficheiros con 51 adicións e 1 borrados
  1. 9 0
      Dockerfile.debug
  2. 2 1
      Tiltfile.opencost
  3. 40 0
      ui/Dockerfile.debug

+ 9 - 0
Dockerfile.debug

@@ -4,15 +4,24 @@ FROM golang:alpine
 # outside of Docker.
 # outside of Docker.
 ARG binary_path
 ARG binary_path
 
 
+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=kubecost-cost-model
+LABEL org.opencontainers.image.url=https://opencost.io
+
 WORKDIR /app
 WORKDIR /app
 RUN apk add --update --no-cache ca-certificates
 RUN apk add --update --no-cache ca-certificates
 RUN go install github.com/go-delve/delve/cmd/dlv@latest
 RUN go install github.com/go-delve/delve/cmd/dlv@latest
 
 
+ADD --chmod=644 ./THIRD_PARTY_LICENSES.txt /THIRD_PARTY_LICENSES.txt
 ADD --chmod=644 ./configs/default.json /models/default.json
 ADD --chmod=644 ./configs/default.json /models/default.json
 ADD --chmod=644 ./configs/azure.json /models/azure.json
 ADD --chmod=644 ./configs/azure.json /models/azure.json
 ADD --chmod=644 ./configs/aws.json /models/aws.json
 ADD --chmod=644 ./configs/aws.json /models/aws.json
 ADD --chmod=644 ./configs/gcp.json /models/gcp.json
 ADD --chmod=644 ./configs/gcp.json /models/gcp.json
 ADD --chmod=644 ./configs/alibaba.json /models/alibaba.json
 ADD --chmod=644 ./configs/alibaba.json /models/alibaba.json
+ADD --chmod=644 ./configs/oracle.json /models/oracle.json
 
 
 COPY ${binary_path} main
 COPY ${binary_path} main
 
 

+ 2 - 1
Tiltfile.opencost

@@ -56,6 +56,7 @@ def run_opencost(options):
         only=[
         only=[
             'cmd/costmodel/costmodel-tilt',
             'cmd/costmodel/costmodel-tilt',
             'configs',
             'configs',
+            'THIRD_PARTY_LICENSES.txt',
         ],
         ],
         live_update=[
         live_update=[
             sync('../opencost/cmd/costmodel/costmodel-tilt', '/app/main'),
             sync('../opencost/cmd/costmodel/costmodel-tilt', '/app/main'),
@@ -90,7 +91,7 @@ def run_opencost(options):
     docker_build(
     docker_build(
         ref=options["docker_repo"]+'opencost-ui',
         ref=options["docker_repo"]+'opencost-ui',
         context='../opencost/ui',
         context='../opencost/ui',
-        dockerfile='../opencost/ui/Dockerfile.cross',
+        dockerfile='../opencost/ui/Dockerfile.debug',
         only=[
         only=[
             'dist',
             'dist',
             'nginx.conf',
             'nginx.conf',

+ 40 - 0
ui/Dockerfile.debug

@@ -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;"]