Skip to content

Commit 403b0df

Browse files
authored
Reduce docker image size
1 parent 941bd54 commit 403b0df

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
FROM ubuntu:22.04 as builder
1+
FROM alpine:3.18 as builder
22

3-
ENV DEBIAN_FRONTEND=noninteractive
4-
ENV TZ=UTC
5-
6-
RUN apt-get update \
7-
&& apt-get install -yq gcc g++ make cmake libssl-dev
3+
RUN apk update \
4+
&& apk add alpine-sdk cmake openssl-dev linux-headers
85

96
WORKDIR /ahp
107

@@ -13,7 +10,9 @@ COPY . .
1310
RUN cmake -B build -DCMAKE_BUILD_TYPE=Release \
1411
&& cmake --build build
1512

16-
FROM ubuntu:22.04
13+
FROM alpine:3.18
14+
15+
RUN apk update && apk add libgcc libstdc++ openssl
1716

1817
COPY --from=builder /ahp/build/ahps /usr/local/bin/ahps
1918
COPY --from=builder /ahp/build/ahpc /usr/local/bin/ahpc

0 commit comments

Comments
 (0)