diff --git a/seahub/Dockerfile b/seahub/Dockerfile
index 23077b5f28dc4bdc5fabf49843f351b43f557897..c94863068bcbbb6e51974fd3cff4213ccd1fd758 100644
--- a/seahub/Dockerfile
+++ b/seahub/Dockerfile
@@ -4,7 +4,7 @@ RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
 RUN apt-get install -y nodejs
 
 WORKDIR /source
-RUN git clone --single-branch --branch=feat/postgres-support https://github.com/justjanne/seahub.git
+RUN git clone --single-branch --branch=feat/postgres-support-backported https://github.com/justjanne/seahub.git
 
 WORKDIR /source/seahub/frontend
 RUN npm install --force
diff --git a/server/Dockerfile b/server/Dockerfile
index 02b7e83f75d0dc86d66de95936f3a5a1570fa181..25fb8afc949c4aa6c498d1733fb01b39229abe5d 100644
--- a/server/Dockerfile
+++ b/server/Dockerfile
@@ -80,8 +80,8 @@ RUN pip install  \
 RUN mkdir /source
 WORKDIR /source
 RUN git clone https://github.com/haiwen/libevhtp.git
-RUN git clone https://github.com/haiwen/libsearpc.git
-RUN git clone --single-branch --branch=feat/postgres-support https://github.com/justjanne/seafile-server.git
+RUN git clone --branch=v3.2-latest https://github.com/haiwen/libsearpc.git
+RUN git clone --single-branch --branch=feat/postgres-support-backported https://github.com/justjanne/seafile-server.git
 
 WORKDIR /source/libevhtp
 RUN cmake -DEVHTP_DISABLE_SSL=ON -DEVHTP_BUILD_SHARED=OFF .