forked from hamrt/credential-converter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 730 Bytes
/
Dockerfile
File metadata and controls
31 lines (21 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM rust:1.82 AS build
# 1. create a workdir to start working from
WORKDIR /credential-converter
# 2. Copy our manifests
COPY ./Cargo.lock ./Cargo.lock
COPY ./Cargo.toml ./Cargo.toml
# # 3. build depedencies for the project
# RUN cargo build --release
# 4. copy over the origninal source and reference files
COPY ./src ./src
COPY ./json ./json
# 5. build the project
RUN cargo build --release
# our final base
FROM rust:1.82-slim
# copy the build artifact from the build stage
COPY --from=build /credential-converter/target/release/credential-converter .
COPY --from=build /credential-converter/json ./json
# set the startup command to run your binary
CMD ["./credential-converter", "-w", "0.0.0.0:3000"]
EXPOSE 3000