Coder Social home page Coder Social logo

Comments (2)

plaird avatar plaird commented on June 8, 2024

Note that there is example code for building a docker image provided in the discussion of Issue #69.

from rules_spring.

plaird avatar plaird commented on June 8, 2024

This is the param doc for our internal docker image rule. I have replaced sensitive info with 'xyz' in the below:

 Required arguments:

   name: the name of this rule

   maintainer: email address of team owning this docker image
               (will be set as "maintainer" label)

   srcs: list of file producing labels, to include in the docker image. For
          typical Scone services, this list should include a reference to
          the springboot target defined in the same BUILD file

   ports: list of ports the service listens on

   runtime_jdk: points to the JDK binary to copy into, and use in, the docker
               image.  This is a Bazel label //tools/jdk:xyz-jdk11


 Optional arguments:

  jarname: the executable jar to run as entrypoint. If this argument is not
           specified, the jar used will be defaulted based on the specified
           srcs.

  java_opts: array of string arguments specified before the jar name, including
             system properties. Be sure to escape regex characters (such as /)
             with a backslash (\/)

  main_args: array of string arguments specified at the end of the cmdline (ie
             passed do your service's main method)

  env: dictionary of environment variables to set in docker image

  directory: the directory to copy the docker file into, defaults to /home/xyz-user

  workdir: the working directory to run the entrypoint in, if unset, defaults
           to the value of the 'directory' attribute

  logic_snippets:  bash shell scripts that are inserted into the standard entrypoint prior
           to launching the service

  makedirs: list of directories (paths) to create under /var/xyz_files.
            /var/xyz_files is the only writable location for the xyz-user
            user.

  base:      the base docker image to use

  user:      defaults to xyz-java, the default user in the default base docker
             image. Should only be set if a custom base docker image is
             specified

 For other optional arguments that you may set, see:
   https://github.com/bazelbuild/rules_docker

 Some other useful arguments are:

 data_path: Set to "." to preserve directories in relative paths.
            For example, if you have srcs = ["src/main/blah/MyFile"], by
            default MyFile will be copied to the docker image without its
            leading path. With data_path = "." set, the leading path will
            also be copied to the docker image

 Note that we do not allow some arguments to be set, such as:
   - entrypoint
   - main_class
   - tars

 If you have a good use-case for needing to set these, please come and talk
 to us.

 The following environment variables are honored (see entrypoint.sh):

 - JAVA_OPTS - if set, the value of ${JAVA_OPTS} is added to the java cmdline,
               before the jar name.
 - MAIN_ARGS - if set, the value of ${MAIN_ARGS} is added to the java cmdline,
               after the jar name

from rules_spring.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.