alamin655 commited on
Update Dockerfile
Browse files- Dockerfile +3 -15
Dockerfile
CHANGED
|
@@ -12,29 +12,17 @@ RUN cargo chef prepare --recipe-path recipe.json
|
|
| 12 |
FROM chef AS builder
|
| 13 |
COPY --from=planner /app/recipe.json recipe.json
|
| 14 |
# Build dependencies - this is the caching Docker layer!
|
| 15 |
-
# Uncomment the line below if you want to use the `hybrid` caching feature.
|
| 16 |
-
# RUN cargo chef cook --release --features redis-cache --recipe-path recipe.json
|
| 17 |
-
# Comment the line below if you don't want to use the `In-Memory` caching feature.
|
| 18 |
RUN cargo chef cook --release --recipe-path recipe.json
|
| 19 |
-
# Uncomment the line below if you want to use the `no cache` feature.
|
| 20 |
-
# RUN cargo chef cook --release --no-default-features --recipe-path recipe.json
|
| 21 |
-
# Uncomment the line below if you want to use the `redis` caching feature.
|
| 22 |
-
# RUN cargo chef cook --release --no-default-features --features redis-cache --recipe-path recipe.json
|
| 23 |
|
| 24 |
# Build application
|
| 25 |
COPY . .
|
| 26 |
-
# Uncomment the line below if you want to use the `hybrid` caching feature.
|
| 27 |
-
# RUN cargo install --path . --features redis-cache
|
| 28 |
-
# Comment the line below if you don't want to use the `In-Memory` caching feature.
|
| 29 |
RUN cargo install --path .
|
| 30 |
-
# Uncomment the line below if you want to use the `no cache` feature.
|
| 31 |
-
# RUN cargo install --path . --no-default-features
|
| 32 |
-
# Uncomment the line below if you want to use the `redis` caching feature.
|
| 33 |
-
# RUN cargo install --path . --no-default-features --features redis-cache
|
| 34 |
|
| 35 |
# We do not need the Rust toolchain to run the binary!
|
| 36 |
FROM gcr.io/distroless/cc-debian12
|
| 37 |
COPY --from=builder /app/public/ /opt/websurfx/public/
|
| 38 |
-
|
|
|
|
|
|
|
| 39 |
COPY --from=builder /usr/local/cargo/bin/* /usr/local/bin/
|
| 40 |
CMD ["websurfx"]
|
|
|
|
| 12 |
FROM chef AS builder
|
| 13 |
COPY --from=planner /app/recipe.json recipe.json
|
| 14 |
# Build dependencies - this is the caching Docker layer!
|
|
|
|
|
|
|
|
|
|
| 15 |
RUN cargo chef cook --release --recipe-path recipe.json
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
# Build application
|
| 18 |
COPY . .
|
|
|
|
|
|
|
|
|
|
| 19 |
RUN cargo install --path .
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
# We do not need the Rust toolchain to run the binary!
|
| 22 |
FROM gcr.io/distroless/cc-debian12
|
| 23 |
COPY --from=builder /app/public/ /opt/websurfx/public/
|
| 24 |
+
COPY --from=builder /app/websurfx/config.lua /etc/xdg/websurfx/config.lua
|
| 25 |
+
COPY --from=builder /app/websurfx/allowlist.txt /etc/xdg/websurfx/allowlist.txt
|
| 26 |
+
COPY --from=builder /app/websurfx/blocklist.txt /etc/xdg/websurfx/blocklist.txt
|
| 27 |
COPY --from=builder /usr/local/cargo/bin/* /usr/local/bin/
|
| 28 |
CMD ["websurfx"]
|