Skip to content

Commit 3b28482

Browse files
committed
WIP
1 parent 0cfba82 commit 3b28482

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

Dockerfile

+6-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ RUN apk add --no-cache build-base cmake nasm bash findutils
77
COPY script/extract ./
88
ENV CPATH=/usr/local/include
99

10-
FROM build as libz
10+
FROM rust:1-alpine as cargo
11+
RUN apk add --no-cache build-base
12+
COPY script/extract ./
13+
14+
FROM cargo as libz
1115
ARG LIBZ_VER
1216
ARG LIBZ_SHA256
1317
COPY download/libz-$LIBZ_VER.tar.gz download/
@@ -105,9 +109,7 @@ RUN ./extract optipng && \
105109
./configure && \
106110
make install
107111

108-
FROM rust:1-alpine as oxipng
109-
RUN apk add --no-cache build-base
110-
COPY script/extract ./
112+
FROM cargo as oxipng
111113
ARG OXIPNG_VER
112114
ARG OXIPNG_SHA256
113115
COPY download/oxipng-$OXIPNG_VER.tar.gz download/

Dockerfile.debian

+6-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ RUN apt-get update && apt-get install -y build-essential cmake nasm bash finduti
77
COPY script/extract ./
88
ENV CPATH=/usr/local/include
99

10-
FROM build as libz
10+
FROM rust:1 as cargo
11+
RUN apt-get update && apt-get install -y build-essential
12+
COPY script/extract ./
13+
14+
FROM cargo as libz
1115
ARG LIBZ_VER
1216
ARG LIBZ_SHA256
1317
COPY download/libz-$LIBZ_VER.tar.gz download/
@@ -105,9 +109,7 @@ RUN ./extract optipng && \
105109
./configure && \
106110
make install
107111

108-
FROM rust:1 as oxipng
109-
RUN apt-get update && apt-get install -y build-essential
110-
COPY script/extract ./
112+
FROM cargo as oxipng
111113
ARG OXIPNG_VER
112114
ARG OXIPNG_SHA256
113115
COPY download/oxipng-$OXIPNG_VER.tar.gz download/

0 commit comments

Comments
 (0)