ruby smaller
parent
114cbdd461
commit
a52a087202
21
do.sh
21
do.sh
|
|
@ -200,15 +200,28 @@ RUN apk update && apk add --no-cache ca-certificates
|
|||
|
||||
#========================
|
||||
|
||||
FROM '"$from"' as builder
|
||||
RUN mkdir -p /var/log
|
||||
RUN apk add --no-cache ruby ruby-bundler make gcc libc-dev
|
||||
'"$gf"'
|
||||
#CMD []
|
||||
#ENTRYPOINT ["sh"]
|
||||
|
||||
#========================
|
||||
|
||||
FROM '"$from"'
|
||||
MAINTAINER breel@qualtrics.com
|
||||
RUN mkdir -p /var/log
|
||||
RUN rm -rf /usr/local/lib/ruby/2.6.0/rubygems /usr/local/bundle/gems /usr/local/bundle/specifications /usr/local/lib/ruby/gems /usr/local/bundle/extensions
|
||||
RUN mkdir -p /usr/local/lib/ruby/2.6.0/ /usr/local/bundle/ /usr/local/bundle/ /usr/local/lib/ruby/ /usr/local/bundle/
|
||||
COPY --from=certs /etc/ssl/certs /etc/ssl/certs
|
||||
COPY --from=builder /usr/local/lib/ruby/2.6.0/rubygems /usr/local/lib/ruby/2.6.0/rubygems
|
||||
COPY --from=builder /usr/local/bundle/gems /usr/local/bundle/gems
|
||||
COPY --from=builder /usr/local/bundle/specifications /usr/local/bundle/specifications
|
||||
COPY --from=builder /usr/local/lib/ruby/gems /usr/local/lib/ruby/gems
|
||||
COPY --from=builder /usr/local/bundle/extensions /usr/local/bundle/extensions
|
||||
WORKDIR /main
|
||||
ENV HOME=/main
|
||||
ENV MNT=/mnt/
|
||||
COPY --from=certs /etc/ssl/certs /etc/ssl/certs
|
||||
RUN apk add --no-cache ruby ruby-bundler alpine-sdk
|
||||
'"$gf"'
|
||||
COPY '"${cp[@]}"' /main/
|
||||
'"$(for dir in ${cpd[@]}; do printf "COPY $dir /main/${dir##*/}\n"; done)"'
|
||||
ENTRYPOINT ["ruby", "/main/'"${main##*/}"'"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue