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

add -fno-PIC when using external linker on alpine #91

Merged
merged 1 commit into from Mar 31, 2016

Conversation

ncopa
Copy link
Contributor

@ncopa ncopa commented Mar 25, 2016

The Alpine toolchain enables PIE by default. Since the go linker does
not (yet) support PIE we need to explicitly disable it on Alpine.

This is a workaround for golang/go#14851

&& apk del .build-deps


Copy link
Member

Choose a reason for hiding this comment

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

Can you move this extra blank line up between ENV and COPY on lines 9 and 10? 🙏 (and please add a comment referencing https://golang.org/issue/14851 while you're at it 👍)

ie:

ENV GOLANG_....

# https://golang.org/issue/14851
COPY no-pic.patch /

RUN ...

The Alpine toolchain enables PIE by default. Since the go linker does
not (yet) support PIE we need to explicitly disable it on Alpine.

This is a workaround for golang/go#14851
@ncopa
Copy link
Contributor Author

ncopa commented Mar 31, 2016

good suggestions 👍 pushed updated fix. thanks!

@tianon
Copy link
Member

tianon commented Mar 31, 2016

I want a reminder of where we need to look for whether we can take this back out yet. 😇 👍

Thanks for updating! LGTM

@yosifkit
Copy link
Member

LGTM

@yosifkit yosifkit merged commit 7339ea4 into docker-library:master Mar 31, 2016
tianon added a commit to infosiftr/stackbrew that referenced this pull request Apr 4, 2016
- `django`: 1.9.5
- `docker`: 1.11.0-rc3, add tune2fs and mkfs.xfs (docker-library/docker#10)
- `elasticsearch`: 2.3.1
- `golang`: force-enable `-fno-PIC` in Alpine (docker-library/golang#91)
- `irssi`: 0.8.19 (jessfraz/irssi#6), add Alpine variant (jessfraz/irssi#7)
- `java`: 9~b112-2 (still fails to build), Alpine to 8.77.03-r0 (8u77), fix Alpine tags to reference the proper version
- `julia`: 0.4.5
- `mariadb`: 10.1.13+maria-1~jessie
- `mongo`: 3.0.11
- `mysql`: `ENTRYPOINT` consistency (`docker-entrypoint.sh` with a compatibility symlink)
- `owncloud`: add `exif` module (docker-library/owncloud#53)
- `php`: 7.0.5, 5.6.20, 5.5.34, always enable `mbstring` (docker-library/php#211)
- `postgres`: 9.5.2-1.pgdg80+1, 9.4.7-1.pgdg80+1, 9.3.12-1.pgdg80+1, 9.2.16-1.pgdg80+1, 9.1.21-1.pgdg80+1, local interfaces during init (docker-library/postgres#136)
- `pypy`: 5.0.1
- `python`: fix `python-config` symlink (docker-library/python#99)
- `rocket.chat`: 0.24.0
- `ruby`: 2.1.9, switch `libedit` to `readline` for `irb` (docker-library/ruby#76)
dochang added a commit to dochang/docker-alpine-scripts that referenced this pull request Jun 3, 2016
RichardScothern pushed a commit to RichardScothern/official-images that referenced this pull request Jun 14, 2016
- `django`: 1.9.5
- `docker`: 1.11.0-rc3, add tune2fs and mkfs.xfs (docker-library/docker#10)
- `elasticsearch`: 2.3.1
- `golang`: force-enable `-fno-PIC` in Alpine (docker-library/golang#91)
- `irssi`: 0.8.19 (jessfraz/irssi#6), add Alpine variant (jessfraz/irssi#7)
- `java`: 9~b112-2 (still fails to build), Alpine to 8.77.03-r0 (8u77), fix Alpine tags to reference the proper version
- `julia`: 0.4.5
- `mariadb`: 10.1.13+maria-1~jessie
- `mongo`: 3.0.11
- `mysql`: `ENTRYPOINT` consistency (`docker-entrypoint.sh` with a compatibility symlink)
- `owncloud`: add `exif` module (docker-library/owncloud#53)
- `php`: 7.0.5, 5.6.20, 5.5.34, always enable `mbstring` (docker-library/php#211)
- `postgres`: 9.5.2-1.pgdg80+1, 9.4.7-1.pgdg80+1, 9.3.12-1.pgdg80+1, 9.2.16-1.pgdg80+1, 9.1.21-1.pgdg80+1, local interfaces during init (docker-library/postgres#136)
- `pypy`: 5.0.1
- `python`: fix `python-config` symlink (docker-library/python#99)
- `rocket.chat`: 0.24.0
- `ruby`: 2.1.9, switch `libedit` to `readline` for `irb` (docker-library/ruby#76)
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.

None yet

3 participants