Skip to content

Workspace Image Being Rebuilt Every Time When Using RUN in .gitpod.Dockerfile #13331

Open
@jimmybrancaccio

Description

@jimmybrancaccio

Bug description

In troubleshooting a recent ticket it appears there's a difference between our self-hosted instance and our SaaS offering in how image builds are handled.

On our SaaS instance when I have a .gitpod.yml file with:

image:
  file: .gitpod.Dockerfile
  
vscode:
  extensions:
    - denoland.vscode-deno
    - github.github-vscode-theme
#tasks:
#  - before: d="$HOME/.slack"; md="/workspace/${d##*/}"; mkdir -p "$md" && rm -rf "$d" && ln -sf "$md" "$d" && exit

and a .gitpod.Dockerfile with the following:

FROM gitpod/workspace-base:latest
 
RUN echo "Hello world!"
RUN echo "I am causing the image to be rebuilt every single time...😩"

and I start a new workspace an image is built as expected. Once the workspace is spun up I then stop it, wait for it stop and then start it up again from the dashboard. During the start up the image is built up again.

On my self-hosted instance running 2022.08.0.10 using the same .gitpod.yml and .gitpod.Dockerfile when initially starting up a new workspace it builds the image as expected however after stopping the workspace and starting it again no image is built.

Steps to reproduce

  1. Create a test repository using the contents for the .gitpod.yml and .gitpod.Dockerfile mentioned above.
  2. Ensure that the repository can be accessed from a self-hosted instance and our SaaS instance.
  3. Spin up a new workspace using your repository on both SaaS and your self-hosted instance.
  4. Observe on both the SaaS and self-hosted instances that the image is built.
  5. Stop both workspaces.
  6. Start up the workspace on the SaaS instance and observe that the image is built again.
  7. Start the workspace on the self-hosted instance and observe the image doesn't get built again.

Workspace affected

jimmybrancac-gitpodtest-l706okxw414

Expected behavior

I would expect both SaaS and self-hosted behave the same. Ideally the image isn't rebuilt as seen on the self-hosted instance.

Example repository

https://github.com/jimmybrancaccio/gitpod-test (please note this repository may be changed as it's one I use for testing and reproducing support issues)

Anything else?

N/A

Front logo Front conversations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions