-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply suggestions for dockerignore and dockerfile
Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>
- Loading branch information
1 parent
5114640
commit 6d248d1
Showing
2 changed files
with
30 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,4 @@ | ||
/target | ||
.DS_Store | ||
.pytest_cache | ||
* | ||
!crates/* | ||
!Cargo.toml | ||
|
||
# Build results | ||
[Dd]ebug/ | ||
[Dd]ebugPublic/ | ||
[Rr]elease/ | ||
[Rr]eleases/ | ||
x64/ | ||
x86/ | ||
build/ | ||
bld/ | ||
[Bb]in/ | ||
[Oo]bj/ | ||
|
||
# Editor directories and files | ||
.idea | ||
xcuserdata/ | ||
|
||
# Added by cargo | ||
# | ||
# already existing elements were commented out | ||
|
||
#/target | ||
node_modules/ | ||
clients/python/env/ | ||
|
||
# Third party license | ||
THIRDPARTY.html | ||
|
||
# Node.js addon binary file, for the current running operating system. | ||
crates/bitwarden-napi/sdk-napi.*.node | ||
|
||
# Complied TypeScript client | ||
crates/bitwarden-napi/dist | ||
|
||
# Uniffi | ||
languages/swift/BitwardenFFI.xcframework | ||
languages/swift/tmp | ||
languages/swift/.build | ||
languages/swift/.swiftpm | ||
languages/kotlin/sdk/src/main/java/com/bitwarden/sdk/bitwarden_uniffi.kt | ||
languages/kotlin/sdk/src/main/java/com/bitwarden/core/bitwarden.kt | ||
|
||
# Schemas | ||
support/schemas | ||
crates/bitwarden-napi/src-ts/bitwarden_client/schemas.ts | ||
languages/csharp/Bitwarden.Sdk/schemas.cs | ||
languages/js_webassembly/bitwarden_client/schemas.ts | ||
languages/python/BitwardenClient/schemas.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,34 @@ | ||
ARG ARCH= | ||
FROM ${ARCH}rust:1.73 as builder | ||
RUN apt-get update && \ | ||
apt-get install --no-install-recommends -y \ | ||
############################################### | ||
# Build stage # | ||
############################################### | ||
FROM --platform=$BUILDPLATFORM rust:1.73 AS build | ||
|
||
# Docker buildx supplies the value for this arg | ||
ARG TARGETPLATFORM | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
COPY ../../ /app | ||
|
||
# Copy required project files | ||
COPY . /app | ||
|
||
# Build project | ||
WORKDIR /app/crates/bws | ||
RUN cargo build --release | ||
FROM ${ARCH}debian:bookworm-slim as runner | ||
|
||
############################################### | ||
# App stage # | ||
############################################### | ||
FROM debian:bookworm-slim | ||
|
||
ARG TARGETPLATFORM | ||
LABEL com.bitwarden.product="bitwarden" | ||
|
||
# Copy built project from the build stage | ||
WORKDIR /usr/local/bin | ||
COPY --from=builder /app/target/release/bws . | ||
COPY --from=builder /etc/ssl/certs /etc/ssl/certs | ||
COPY --from=build /app/target/release/bws . | ||
COPY --from=build /etc/ssl/certs /etc/ssl/certs | ||
|
||
ENTRYPOINT ["bws"] | ||
|