> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/open-source/use-harness-open-source/pipelines-1/volumes.md).

# Volumes

Pipeline steps can mount various [volumes](https://github.com/iKettles/harness-gitbook/tree/main/open-source/use-harness-open-source/reference/pipelines/yaml/volume.md) types into the running container.

## Temporary Volumes <a href="#temporary-volumes" id="temporary-volumes"></a>

Temporary mounts are docker volumes that are created before the pipeline starts and destroyed when the pipeline completes. This can be used to share files or folders among pipeline steps.

```yaml
kind: pipeline
spec:
  stages:
  - type: ci
    spec:
      volumes:
      - name: cache
        spec: {}
        type: temp
      steps:
      - name: test
        type: run
        spec:
          container: golang
          mount:
          - name: cache
            path: /go
          script: |-
            go install
            go test
      - name: build
        type: run
        spec:
          container: golang
          mount:
          - name: cache
            path: /go
          script: |-
            go build
```
