Skip to content

Commit

Permalink
Specifically copy over src/main.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Tehnix committed Nov 12, 2023
1 parent d88e0f8 commit 88159e2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lambda-directly-optimized/Dockerfile-arm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ COPY scaffold.rs /dist/apollo-router-lambda/src/main.rs
RUN export PATH="$HOME/.cargo/bin:$PATH"; export RUSTFLAGS="-Zlocation-detail=none -Zthreads=8"; cargo lambda build --compiler cargo -Z build-std=std --target $TARGET --release; rm -r src; target/lambda/apollo-router-lambda/bootstrap

# Copy our actual application code and build this.
COPY src /dist/apollo-router-lambda/src
COPY src/main.rs /dist/apollo-router-lambda/src/main.rs

# Build our lambda bootstrap binary. The release artifact can be found at:
# /dist/apollo-router-lambda/target/lambda/apollo-router-lambda/bootstrap
Expand Down
4 changes: 2 additions & 2 deletions lambda-directly-optimized/Dockerfile-arm-graviton
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ RUN export PATH="$HOME/.cargo/bin:$PATH"; \
rm target/lambda/apollo-router-lambda/bootstrap

# Copy our actual application code and build this.
COPY src /dist/apollo-router-lambda/src
COPY src/main.rs /dist/apollo-router-lambda/src/main.rs

# Build our lambda bootstrap binary. The release artifact can be found at:
# /dist/apollo-router-lambda/target/lambda/apollo-router-lambda/bootstrap
# NOTE: We add additional ARM/Graviton2 specific flags to the build process. See more at
# https://github.com/aws/aws-graviton-getting-started/blob/main/rust.md.
RUN export PATH="$HOME/.cargo/bin:$PATH"; export RUSTFLAGS="-Ctarget-feature=+lse -Ctarget-cpu=neoverse-n1 -Zlocation-detail=none -Zthreads=8"; cargo lambda build --compiler cargo -Z build-std=std --target $TARGET --release
RUN export PATH="$HOME/.cargo/bin:$PATH"; export RUSTFLAGS="-Ctarget-feature=+lse -Ctarget-cpu=neoverse-n1 -Zlocation-detail=none -Zthreads=8"; cat src/main.rs; cargo lambda build --compiler cargo -Z build-std=std --target $TARGET --release
2 changes: 1 addition & 1 deletion lambda-directly-optimized/Dockerfile-x86
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ RUN export PATH="$HOME/.cargo/bin:$PATH"; \
rm target/lambda/apollo-router-lambda/bootstrap

# Copy our actual application code and build this.
COPY src /dist/apollo-router-lambda/src
COPY src/main.rs /dist/apollo-router-lambda/src/main.rs

# Build our lambda bootstrap binary. The release artifact can be found at:
# /dist/apollo-router-lambda/target/lambda/apollo-router-lambda/bootstrap
Expand Down
2 changes: 1 addition & 1 deletion lambda-directly/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RUN export PATH="$HOME/.cargo/bin:$PATH"; \
rm target/lambda/apollo-router-lambda/bootstrap

# Copy our actual application code and build this.
COPY src /dist/apollo-router-lambda/src
COPY src/main.rs /dist/apollo-router-lambda/src/main.rs

# Build our lambda bootstrap binary. The release artifact can be found at:
# /dist/apollo-router-lambda/target/lambda/apollo-router-lambda/bootstrap
Expand Down
2 changes: 1 addition & 1 deletion lambda-with-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RUN export PATH="$HOME/.cargo/bin:$PATH"; \
rm target/lambda/apollo-router-lambda/bootstrap

# Copy our actual application code and build this.
COPY src /dist/apollo-router-lambda/src
COPY src/main.rs /dist/apollo-router-lambda/src/main.rs

# Build our lambda bootstrap binary. The release artifact can be found at:
# /dist/apollo-router-lambda/target/lambda/apollo-router-lambda/bootstrap
Expand Down

0 comments on commit 88159e2

Please sign in to comment.