Skip to content
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

Use multistage docker build #32

Merged
merged 4 commits into from
Jan 9, 2024

Conversation

keynmol
Copy link
Contributor

@keynmol keynmol commented May 5, 2023

This is just a proposal, so that the docker image can be built with a single command without having to build the binary prior to that.

Dockerfile Outdated Show resolved Hide resolved
built correctly.

See this SO answer: https://stackoverflow.com/questions/74761737/how-to-use-a-multiarch-base-docker-image-when-specifying-sha

The manifest information for alpine base image:

```
Name:      docker.io/library/golang:1.20.3-alpine
MediaType: application/vnd.docker.distribution.manifest.list.v2+json
Digest:    sha256:08e9c086194875334d606765bd60aa064abd3c215abfbcf5737619110d48d114

Manifests:
  Name:      docker.io/library/golang:1.20.3-alpine@sha256:48c87cd759e3342fcbc4241533337141e7d8457ec33ab9660abe0a4346c30b60
  MediaType: application/vnd.docker.distribution.manifest.v2+json
  Platform:  linux/amd64

  Name:      docker.io/library/golang:1.20.3-alpine@sha256:0f9d434ef44b3d2284ede2cdda59917584db48285a76d582a3b46e59300304ba
  MediaType: application/vnd.docker.distribution.manifest.v2+json
  Platform:  linux/arm/v6

  ...

```
Dockerfile Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@varungandhi-src varungandhi-src left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, would be nice to address the couple of minor comments.

@keynmol keynmol merged commit fe7fdb7 into sourcegraph:main Jan 9, 2024
@keynmol keynmol deleted the multistage-docker-build branch March 19, 2024 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants