-
Notifications
You must be signed in to change notification settings - Fork 517
add -fno-PIC when using external linker on alpine #91
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
Conversation
&& apk del .build-deps | ||
|
||
|
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.
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
16dd63a
to
0f3ab4a
Compare
good suggestions 👍 pushed updated fix. thanks! |
I want a reminder of where we need to look for whether we can take this back out yet. 😇 👍 Thanks for updating! LGTM |
LGTM |
- `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)
See docker-library/golang#91 for details.
- `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)
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