freestyle

Run shell (bash or sh) commands on top of a docker image

arguments

  • cmd - docker CMD arguments to use along with the container entrypoint. can be string or array of strings.
  • commands - One or more commands to execute in a shell in the container, as array of strings.
  • entry_point - Override the default container entrypoint. can be string or array of strings.
  • environment - A set of environment variables for the container.
  • image - The image from which the executable container is created. It can be an explicit ID of a Docker image, or a variable that references a Build or Push step.
  • shell - Explicitly set the executing shell to bash or sh. If not set the default will be sh.
  • volumes - One or more volumes for the container. All volumes must be mounted from the existing shared volume (see details below).
  • working_directory - The directory from which the commands are executed. It can be an explicit path in the container’s file system, or a variable that references another step. The default working_directory is the cloned repository directory and not the working directory specified by the image. If you need to use the default working directory of the image use IMAGE_WORK_DIR.
    Freestyle:
  title: Running docker image
  type: freestyle
  working_directory: '${{CLONE_STEP_NAME}}'
  arguments:
    image: 'alpine:3.8'
    commands:
      - echo "Hello world"
      - echo "asdasd"

  
    Freestyle:
  title: Running docker image
  type: freestyle
  working_directory: /
  arguments:
    image: 'alpine:3.8'
    commands:
      - echo "Hello world"
      - echo "asdasd"

  
github.com
Codefresh INC
Feb 4, 2020