-
Notifications
You must be signed in to change notification settings - Fork 16
Optimize Docker builds: Add .dockerignore, improve caching, and enhance Dockerfile structure #164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,38 @@ | ||
| # More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file | ||
| # Ignore build and test binaries. | ||
| # Version control | ||
| .git | ||
| .gitignore | ||
|
|
||
| # Documentation | ||
| *.md | ||
| docs/ | ||
|
|
||
| # Tests | ||
| *_test.go | ||
| internal/testhelpers | ||
| internal/tests | ||
|
|
||
| # Development | ||
| .env | ||
| .env.* | ||
| *.log | ||
| skaffold.yaml | ||
| skaffold.example.env | ||
|
|
||
| # Build artifacts | ||
| bin/ | ||
| helm/ | ||
| internal/demo | ||
|
|
||
| # IDE | ||
| .vscode | ||
| .idea | ||
| *.swp | ||
|
|
||
| # CI/CD | ||
| .github | ||
| .goreleaser.yml | ||
| .goreleaser.main.yml | ||
|
|
||
| # Go | ||
| go.work | ||
| go.work.sum |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,16 +34,25 @@ jobs: | |
| - name: Build worker-controller image | ||
| run: | | ||
| skaffold build --profile worker-controller --push=false | ||
| env: | ||
| DOCKER_BUILDKIT: 1 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it seems like somehow this isn't being passed to the skaffold build job, which is failing with |
||
| BUILDKIT_PROGRESS: plain | ||
|
|
||
| - name: Build helloworld worker image | ||
| run: | | ||
| skaffold build --profile helloworld-worker --push=false | ||
| env: | ||
| DOCKER_BUILDKIT: 1 | ||
| BUILDKIT_PROGRESS: plain | ||
|
|
||
| # Verify that the demo worker patch applies successfully and builds. | ||
| - name: Build helloworld worker image patch | ||
| run: | | ||
| git apply internal/demo/helloworld/changes/no-version-gate.patch | ||
| skaffold build --profile helloworld-worker --push=false | ||
| env: | ||
| DOCKER_BUILDKIT: 1 | ||
| BUILDKIT_PROGRESS: plain | ||
|
|
||
| test-integration: | ||
| name: Run Integration Tests | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| FROM gcr.io/distroless/static-debian12:nonroot | ||
|
|
||
| COPY temporal-worker-controller /usr/local/bin/temporal-worker-controller | ||
| WORKDIR /app | ||
|
|
||
| COPY --chown=nonroot:nonroot temporal-worker-controller /usr/local/bin/temporal-worker-controller | ||
|
|
||
| USER nonroot | ||
|
|
||
| ENTRYPOINT ["temporal-worker-controller"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this is why the skaffold build is breaking? not sure