Include contents of the zed-server repo
We're going full monorepo. Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
parent
34abda3a04
commit
1537500fcb
99 changed files with 7206 additions and 75 deletions
33
Dockerfile
Normal file
33
Dockerfile
Normal file
|
@ -0,0 +1,33 @@
|
|||
# syntax = docker/dockerfile:1.2
|
||||
|
||||
FROM rust as builder
|
||||
WORKDIR app
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
|
||||
RUN apt-get install -y nodejs
|
||||
COPY . .
|
||||
|
||||
# Install script dependencies
|
||||
RUN --mount=type=cache,target=./script/node_modules \
|
||||
cd ./script && npm install --quiet
|
||||
|
||||
# Build CSS
|
||||
RUN --mount=type=cache,target=./script/node_modules \
|
||||
script/build-css --release
|
||||
|
||||
# Compile server
|
||||
RUN --mount=type=cache,target=./script/node_modules \
|
||||
--mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=./target \
|
||||
cargo build --release --bin zed-server
|
||||
|
||||
# Copy server binary out of cached directory
|
||||
RUN --mount=type=cache,target=./target \
|
||||
cp /app/target/release/zed-server /app/zed-server
|
||||
|
||||
# Copy server binary to the runtime image
|
||||
FROM debian:buster-slim as runtime
|
||||
RUN apt-get update; \
|
||||
apt-get install -y --no-install-recommends libcurl4-openssl-dev ca-certificates
|
||||
WORKDIR app
|
||||
COPY --from=builder /app/zed-server /app
|
||||
ENTRYPOINT ["/app/zed-server"]
|
Loading…
Add table
Add a link
Reference in a new issue