-
Notifications
You must be signed in to change notification settings - Fork 34
/
Dockerfile
35 lines (28 loc) · 1.23 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM memcached:1.6.23-bookworm as build
FROM alpine:3 AS sys
RUN set -xe; \
mkdir -p /target/etc; \
mkdir -p /blank; \
apk --no-cache add \
ca-certificates \
tzdata \
; \
update-ca-certificates; \
ln -sf ../usr/share/zoneinfo/Etc/UTC /target/etc/localtime; \
echo "Etc/UTC" > /target/etc/timezone;
FROM scratch
COPY --from=sys /target/etc /etc
COPY --from=sys /usr/share/zoneinfo/Etc/UTC /usr/share/zoneinfo/Etc/UTC
COPY --from=sys /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=sys /blank /tmp
# Binary executable
COPY --from=build /usr/local/bin/memcached /usr/bin/memcached
# System libraryes
COPY --from=build /lib/x86_64-linux-gnu/libssl.so.3 /lib/x86_64-linux-gnu/libssl.so.3
COPY --from=build /lib/x86_64-linux-gnu/libcrypto.so.3 /lib/x86_64-linux-gnu/libcrypto.so.3
COPY --from=build /lib/x86_64-linux-gnu/libevent-2.1.so.7 /lib/x86_64-linux-gnu/libevent-2.1.so.7
COPY --from=build /lib/x86_64-linux-gnu/libsasl2.so.2 /lib/x86_64-linux-gnu/libsasl2.so.2
COPY --from=build /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libc.so.6
COPY --from=build /lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
# Configuration files
COPY --from=build /etc/passwd /etc/passwd