mirror of
https://github.com/imgproxy/imgproxy.git
synced 2024-11-29 08:22:11 +02:00
5062e7494d
This https://github.com/golang/go/issues/23672 security fix breaks CGO compilation in go version 1.9.4 by disallowing LDFLAGS in process.go:5
22 lines
691 B
Docker
22 lines
691 B
Docker
FROM alpine:edge
|
|
MAINTAINER Sergey Aleksandrovich <darthsim@gmail.com>
|
|
|
|
ENV GOPATH /go
|
|
ENV PATH /usr/local/go/bin:$PATH
|
|
|
|
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
|
|
|
|
ADD . /go/src/github.com/DarthSim/imgproxy
|
|
|
|
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
|
&& apk add --no-cache --update bash vips ca-certificates \
|
|
&& apk add --no-cache --virtual .build-deps go gcc musl-dev fftw-dev vips-dev \
|
|
&& cd /go/src/github.com/DarthSim/imgproxy \
|
|
&& CGO_LDFLAGS_ALLOW="-s|-w" go build -v -o /usr/local/bin/imgproxy \
|
|
&& apk del --purge .build-deps \
|
|
&& rm -rf /var/cache/apk*
|
|
|
|
CMD ["imgproxy"]
|
|
|
|
EXPOSE 8080
|