openanalytics / shinyproxy-operator

Easily run ShinyProxy on a Kubernetes cluster
https://shinyproxy.io
Apache License 2.0
37 stars 9 forks source link

How to build custom shinyproxy-operator image? #3

Closed cnukwas closed 3 years ago

cnukwas commented 3 years ago

I was able to set up and run shinyproxy-operator as is and noticed that the operator is using below container image. I see the image at dockerhub, is it possible to get either the source code or Dockerfile to know what goes into the image and tweak few things? We would like to build our own image and use internal private registry for security reasons, to make sure that we know what's in the image.

spec:
      containers:
        - name: shinyproxy-operator
          image: openanalytics/shinyproxy-operator-snapshot:0.0.1-SNAPSHOT-20201005.090146
          imagePullPolicy: Always
          env:
            - name: SPO_MODE
              value: namespaced
      serviceAccountName: shinyproxy-operator-sa
LEDfan commented 3 years ago

We're still working on a proper release of the Operator, including documentation. This would include the Dockerfile. To give you an idea of the file:

    FROM openjdk:11

    ENV SHINY_USER shinyproxy-operator

    ## Setup of shinyproxy
    RUN mkdir -p /opt/shinyproxy-operator/
    ADD shinyproxy-operator.jar /opt/shinyproxy-operator/shinyproxy-operator.jar

    RUN useradd -c 'shinyproxy-operator user' -m -d /home/shinyproxy -s /bin/nologin $SHINY_USER
    RUN chown -R $SHINY_USER:$SHINY_USER /opt/shinyproxy-operator
    WORKDIR /etc/shinyproxy
    USER $SHINY_USER
    CMD ["java", "-jar", "/opt/shinyproxy-operator/shinyproxy-operator.jar"]

Note that before we do a proper release, some things may change in the operator that could make updating a bit more difficult. For example, it could be the case that some pod labels or annotations are going to change. Nevertheless, I'm looking forward to your experiences with the operator!

cnukwas commented 3 years ago

Sure, thanks for the update.

LEDfan commented 3 years ago

Hi

I just uploaded our Dockerfiles for both the Operator and ShinyProxy itself to https://github.com/openanalytics/shinyproxy-docker . Note that we changed the Dockerfile compared to the version I provided above.