# # Here is the sample that stipulate fields that can be set # # Config section is shared across by Dockerfile and docker cli config do # this et the workdir inside the docker # - Used by Dockerfile to set the default dir upon startup # - Optionally used by docker cli to mount the development gem # directory into the parent of the workdir # Default to "/opt" if not given #set_workdir "/opt/dockerun" # determine apt-get or dnf or other set_platform :debian # Create user and group same as local user and group # so the files created on mounted volume is same level # as current running user set_current_user # Additional context for dockerun to consider # Here is set to Rubygems context # For example can bundle link the development gems # into docker without user configuration, all from # Gemfile of the Rubygems project #activate_context :rubygems do # duplicate_dev_env # keep_gen_file #end # trigger dry run whereby: # 1. Dockerfile shall be generated # 2. All docker command shall be printed out # Docker image is not built and container is not created #dry_run # generate the docker runscript so it can be run manually # if required gen_docker_runscript end # This section is for Dockerfile entry # and also during docker build operation from "ruby:3.2.1" do # keep the generated dockerfile # Default is true. Can disable by : # keep_dockerfile false keep_dockerfile # Docker image name # Shall be used during building of docker image # Shall be referred for operations such as if # image already exist # If not given shall default to dir_name+"_docker_image" #set_image_name "dockerun-image" # apt-get update && apt-get -y upgrade is on by default # Can ask to skip update and upgrade by follwing: #skip_update #skip_upgrade # List of software to install on the image install "git", "curl" # Transfer the workdir from config into Dockerfile set_workdir # set CMD of the Dockerfile set_command "/bin/bash" end # section here shall generate docker command line: # docker run -it ... ... up do # Container name to be refer later # If not given shall be default to dir_name+"_cont_name" #set_container_name "dockerun-container" # keep the generated container so can be reuse # next time # Can be disable by : keep false keep # Interactive session for the container # Can be disable by : interactive false interactive #mount "/opt/smtg" => "/opt/smtg" # Mount directory into the docker container mount current_dir: workdir # Command to be run in docker #run_in_docker "/bin/bash" # Map port of docker to host #port 3080 => 3000 end # Entry point to ask the engine start operation # No needed for scripted operation #go