Skip to content

Commit 390c860

Browse files
authored
balancer: slightly improve docker layer caching (#1665)
1 parent 025e233 commit 390c860

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

deploy/balancer.Dockerfile

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
FROM rust:1-slim-buster as build-stage
22

33
WORKDIR /app/
4-
5-
COPY . .
6-
74
RUN apt-get update && apt-get install -y build-essential pkg-config openssl libssl-dev && rm -rf /var/lib/apt/lists/*
8-
5+
COPY . .
96
RUN cargo build --release --bin ott-balancer-bin && mv ./target/release/ott-balancer-bin . && cargo clean
107

118
FROM debian:buster-slim as production-stage

deploy/fly.prod.balancer.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ primary_region = "ewr"
33

44
[build]
55
dockerfile = "balancer.Dockerfile"
6+
build-target = "deploy-stage"
67

78
[build.args]
89
DEPLOY_TARGET = "ott-balancer-prod"

deploy/fly.staging.balancer.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ primary_region = "ewr"
33

44
[build]
55
dockerfile = "balancer.Dockerfile"
6+
build-target = "deploy-stage"
67

78
[build.args]
89
DEPLOY_TARGET = "ott-balancer-staging"

0 commit comments

Comments
 (0)