@@ -153,7 +153,7 @@ ARG LD=${target_host}-ld
153
153
ARG STRIP=${target_host}-strip
154
154
ARG QEMU_LD_PREFIX=/usr/${target_host}
155
155
ARG TARGET=${target_host_rust}
156
- ARG PKG_CONFIG_PATH=/usr/${target_host }/lib/pkgconfig
156
+ ARG PKG_CONFIG_PATH=${QEMU_LD_PREFIX }/lib/pkgconfig
157
157
158
158
WORKDIR /opt
159
159
@@ -181,14 +181,16 @@ RUN make install
181
181
WORKDIR /opt/postgres
182
182
183
183
RUN tar xzf ${POSTGRES_TARBALL} --strip-components=1
184
- RUN ./configure --prefix=${QEMU_LD_PREFIX} --without-readline
184
+ RUN ./configure --host=${target_host} -- prefix=${QEMU_LD_PREFIX} --without-readline
185
185
RUN make install -C src/include
186
186
RUN make install -C src/interfaces/libpq
187
- RUN make install -C src/bin/pg_config
187
+
188
+ RUN mkdir -p /tmp/postgres_install/lib && \
189
+ cp -a ${QEMU_LD_PREFIX}/lib/libpq.* /tmp/postgres_install/lib/
188
190
189
191
WORKDIR /opt/lightningd
190
192
191
- RUN mkdir -p .cargo && tee .cargo/config <<-EOF
193
+ RUN mkdir -p .cargo && tee .cargo/config.toml <<-EOF
192
194
[target.${target_host_rust}]
193
195
linker = "${target_host}-gcc"
194
196
EOF
@@ -203,7 +205,6 @@ FROM ${BASE_DISTRO} AS final
203
205
204
206
RUN apt-get update -qq && \
205
207
apt-get install -qq -y --no-install-recommends \
206
- libpq5 \
207
208
inotify-tools \
208
209
socat \
209
210
jq && \
@@ -215,17 +216,19 @@ ENV LIGHTNINGD_RPC_PORT=9835
215
216
ENV LIGHTNINGD_PORT=9735
216
217
ENV LIGHTNINGD_NETWORK=bitcoin
217
218
218
- COPY --from=builder /tmp/lightning_install/ /usr/local /
219
- COPY --from=downloader /opt/bitcoin /bin /usr/bin
220
- COPY --from=downloader /opt/litecoin/bin /usr/bin
221
- COPY tools/docker-entrypoint.sh /entrypoint.sh
219
+ COPY --from=downloader /opt/bitcoin/bin/ /usr/bin /
220
+ COPY --from=downloader /opt/litecoin /bin/ /usr/bin/
221
+ COPY --from=builder /tmp/lightning_install/ /usr/local/
222
+ COPY --from=builder /tmp/postgres_install/lib/ /usr/lib/
222
223
223
- RUN for f in /usr/local/bin/* /usr/ bin/*; do \
224
+ RUN for f in /usr/bin/*; do \
224
225
if file "$f" | grep -q ELF; then \
225
226
strip --strip-unneeded "$f" ; \
226
227
fi; \
227
228
done
228
229
230
+ COPY tools/docker-entrypoint.sh /entrypoint.sh
231
+
229
232
# TODO: user creation. user permissions on volume.
230
233
231
234
EXPOSE 9735 9835
0 commit comments