Jelajahi Sumber

Revert "fix the docker build"

This reverts commit 09358570b3eace58aac17576e0467b4c897776d5.
appflowy 3 tahun lalu
induk
melakukan
e66c8ac78e
1 mengubah file dengan 3 tambahan dan 10 penghapusan
  1. 3 10
      backend/Dockerfile

+ 3 - 10
backend/Dockerfile

@@ -1,23 +1,16 @@
 
-FROM rust:latest
+FROM rust:1.53.0
 # Let's switch our working directory to `app` (equivalent to `cd app`)
 # The `app` folder will be created for us by Docker in case it does not
 # exist already.
 WORKDIR /app
 
-RUN apt-get update -y \
-    && apt-get install -y --no-install-recommends git \
-    # Clean up
-    && apt-get autoremove -y \
-    && apt-get clean -y \
-    && rm -rf /var/lib/apt/lists/*
-
-RUN git clone https://github.com/AppFlowy-IO/appflowy.git .
+COPY . .
 
 WORKDIR /app/backend
 ENV SQLX_OFFLINE true
 ENV APP_ENVIRONMENT production
-RUN RUSTFLAGS="-C opt-level=2" cargo build --release
+RUN cargo build --release
 
 # When `docker run` is executed, launch the binary!
 ENTRYPOINT ["./target/release/backend"]