Skip to content

Dockerfile.alpine: add Git & Mercurial #922

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

Merged
merged 1 commit into from
Feb 5, 2020
Merged

Dockerfile.alpine: add Git & Mercurial #922

merged 1 commit into from
Feb 5, 2020

Conversation

Dominik-K
Copy link
Contributor

Fixes partly #897

@claassistantio
Copy link

claassistantio commented Jan 13, 2020

CLA assistant check
All committers have signed the CLA.

# required to support cgo
RUN apk --no-cache add gcc musl-dev
# needed most times for `go get`, etc. See https://github.com/docker-library/golang/issues/80
RUN apk add --no-cache git mercurial
Copy link
Contributor

Choose a reason for hiding this comment

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

why did you remove gcc and musl-dev?

Copy link
Contributor Author

@Dominik-K Dominik-K Jan 27, 2020

Choose a reason for hiding this comment

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

@jirfag The golang:alpine images already have them installed. See e.g. https://github.com/docker-library/golang/blob/7b69aab8c4a9117743168ca8b19b314c0307e415/1.13/alpine3.11/Dockerfile#L16-L17
(noted it also in the commit message, though)

Choose a reason for hiding this comment

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

gcc and musl-dev are only used for building Go, and they are removed from the golang:alpine image at https://github.com/docker-library/golang/blob/7b69aab8c4a9117743168ca8b19b314c0307e415/1.13/alpine3.11/Dockerfile#L55

Actually, running gcc fails with the golang:alpine image.

$ docker run golang:1.13-alpine gcc
docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: \"gcc\": executable file not found in $PATH": unknown.
ERRO[0000] error waiting for container: context canceled
$ docker run golang:1.13-alpine bash
docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown.
ERRO[0000] error waiting for container: context canceled

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shogo82148 Thanks for the clarification.
@jirfag I've undone this commit. Sorry about my mistake.

@ernado ernado merged commit b7bff48 into golangci:master Feb 5, 2020
@Dominik-K Dominik-K deleted the patch-1 branch February 13, 2020 19:44
@ldez ldez added this to the v1.23 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants