@@ -134,7 +134,6 @@ RUN \
134
134
--mount=type=cache,target=/var/cache/apt,sharing=locked \
135
135
--mount=type=cache,target=/var/lib/apt,sharing=locked \
136
136
apt-get update -qq && \
137
- apt-get install -y --no-install-recommends rsync && \
138
137
apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances --no-pre-depends \
139
138
curl \
140
139
gosu \
@@ -152,10 +151,6 @@ RUN \
152
151
done
153
152
154
153
# Extract the debs for each architecture
155
- # On the runtime image, /lib is a symlink to /usr/lib, so we need to copy the
156
- # libraries to the right place, else the `COPY` won't work.
157
- # On amd64, we'll also have a /lib64 folder with ld-linux-x86-64.so.2, which is
158
- # already present in the runtime image.
159
154
RUN \
160
155
for arch in arm64 amd64; do \
161
156
mkdir -p /install-${arch}/var/lib/dpkg/status.d/ && \
@@ -165,8 +160,6 @@ RUN \
165
160
dpkg --ctrl-tarfile $deb | tar -Ox ./control > /install-${arch}/var/lib/dpkg/status.d/${package_name}; \
166
161
dpkg --extract $deb /install-${arch}; \
167
162
done; \
168
- rsync -avr /install-${arch}/lib/ /install-${arch}/usr/lib; \
169
- rm -rf /install-${arch}/lib /install-${arch}/lib64; \
170
163
done
171
164
172
165
@@ -183,7 +176,14 @@ LABEL org.opencontainers.image.documentation='https://github.com/element-hq/syna
183
176
LABEL org.opencontainers.image.source='https://github.com/element-hq/synapse.git'
184
177
LABEL org.opencontainers.image.licenses='AGPL-3.0-or-later'
185
178
186
- COPY --from=runtime-deps /install-${TARGETARCH} /
179
+ # On the runtime image, /lib is a symlink to /usr/lib, so we need to copy the
180
+ # libraries to the right place, else the `COPY` won't work.
181
+ # On amd64, we'll also have a /lib64 folder with ld-linux-x86-64.so.2, which is
182
+ # already present in the runtime image.
183
+ COPY --from=runtime-deps /install-${TARGETARCH}/lib /usr/lib
184
+ COPY --from=runtime-deps /install-${TARGETARCH}/etc /etc
185
+ COPY --from=runtime-deps /install-${TARGETARCH}/usr /usr
186
+ COPY --from=runtime-deps /install-${TARGETARCH}/var /var
187
187
COPY --from=builder /install /usr/local
188
188
COPY ./docker/start.py /start.py
189
189
COPY ./docker/conf /conf
0 commit comments