mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 02:53:48 -05:00
Add all dev/dbg packages to Docker image
This commit is contained in:
parent
e30d116980
commit
e9232929c4
3 changed files with 43 additions and 5 deletions
|
@ -1,4 +1,5 @@
|
||||||
*
|
*
|
||||||
|
!install-all-dev-packages.sh
|
||||||
!start.sh
|
!start.sh
|
||||||
!/conf
|
!/conf
|
||||||
!/lib
|
!/lib
|
||||||
|
|
|
@ -21,6 +21,8 @@ RUN apt-get update && \
|
||||||
WORKDIR /build/jemalloc-5.1.0
|
WORKDIR /build/jemalloc-5.1.0
|
||||||
RUN dpkg-buildpackage
|
RUN dpkg-buildpackage
|
||||||
|
|
||||||
|
ADD install-all-dev-packages.sh /install-all-dev-packages.sh
|
||||||
|
|
||||||
RUN rm -rf /var/lib/apt/lists
|
RUN rm -rf /var/lib/apt/lists
|
||||||
|
|
||||||
COPY vendor/envsubst /opt/envsubst
|
COPY vendor/envsubst /opt/envsubst
|
||||||
|
@ -41,7 +43,10 @@ RUN make package \
|
||||||
-name 'writelatex-git-bridge*jar-with-dependencies.jar' \
|
-name 'writelatex-git-bridge*jar-with-dependencies.jar' \
|
||||||
-exec mv {} /git-bridge.jar \;
|
-exec mv {} /git-bridge.jar \;
|
||||||
|
|
||||||
FROM openjdk:11-jre
|
FROM builder
|
||||||
|
# FROM openjdk:11-jre <-- disabled while we are memory profiling
|
||||||
|
|
||||||
|
WORKDIR /
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y git sqlite3 procps htop net-tools sockstat binutils graphviz \
|
RUN apt-get update && apt-get install -y git sqlite3 procps htop net-tools sockstat binutils graphviz \
|
||||||
&& rm -rf /var/lib/apt/lists
|
&& rm -rf /var/lib/apt/lists
|
||||||
|
@ -56,12 +61,16 @@ RUN mkdir /opt/cdbg && \
|
||||||
wget -qO- https://storage.googleapis.com/cloud-debugger/compute-java/debian-wheezy/cdbg_java_agent_gce.tar.gz | \
|
wget -qO- https://storage.googleapis.com/cloud-debugger/compute-java/debian-wheezy/cdbg_java_agent_gce.tar.gz | \
|
||||||
tar xvz -C /opt/cdbg
|
tar xvz -C /opt/cdbg
|
||||||
|
|
||||||
RUN useradd --create-home node
|
# Disabled while we are memory profiling (these are already in the image)
|
||||||
|
# RUN useradd --create-home node
|
||||||
|
|
||||||
COPY --from=builder /git-bridge.jar /
|
# COPY --from=builder /git-bridge.jar /
|
||||||
COPY --from=builder /build/*.deb /tmp/
|
# COPY --from=builder /build/*.deb /tmp/
|
||||||
|
|
||||||
RUN dpkg -i /tmp/libjemalloc*.deb
|
# RUN dpkg -i /tmp/libjemalloc*.deb
|
||||||
|
RUN dpkg -i /build/*.deb
|
||||||
|
|
||||||
|
RUN apt-get -y update && /install-all-dev-packages.sh && rm -rf /var/lib/apt/lists
|
||||||
|
|
||||||
COPY vendor/envsubst /opt/envsubst
|
COPY vendor/envsubst /opt/envsubst
|
||||||
RUN chmod +x /opt/envsubst
|
RUN chmod +x /opt/envsubst
|
||||||
|
|
28
services/git-bridge/install-all-dev-packages.sh
Executable file
28
services/git-bridge/install-all-dev-packages.sh
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
apt-cache pkgnames > /tmp/allpackages
|
||||||
|
|
||||||
|
BADPKGLIST="libjemalloc2"
|
||||||
|
NEWPKGLIST="build-essential"
|
||||||
|
|
||||||
|
echo "Searching for required -dev and -dbg packages..."
|
||||||
|
for PKG in `dpkg --get-selections | sed 's/[: ].*//'`
|
||||||
|
do
|
||||||
|
# Make sure it's not in the ignore list
|
||||||
|
echo $BADPKGLIST | grep -q $PKG
|
||||||
|
if [ $? -eq 0 ]
|
||||||
|
then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
for suffix in dev dbg dbgsym
|
||||||
|
do
|
||||||
|
grep -qe "^$PKG-$suffix$" /tmp/allpackages
|
||||||
|
if [ $? -eq 0 ]
|
||||||
|
then
|
||||||
|
NEWPKGLIST=" $NEWPKGLIST $PKG-$suffix"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
apt-get install -y $NEWPKGLIST
|
||||||
|
|
Loading…
Reference in a new issue