@@ -11,32 +11,51 @@ COPY ca.crt /root/ca.crt
1111# Put certs in /etc/ssl/certs location
1212RUN cat /root/ca.crt >> /etc/ssl/certs/ca-certificates.crt
1313
14- RUN apk update && apk add --no-cache build-base
14+ # Install required packages, including bash
15+ RUN apk update && apk add --no-cache \
16+ build-base \
17+ openssl-dev \
18+ bash
1519
20+ # Set workdir
1621WORKDIR /app
1722
18- # Copy all scripts to docker images
23+ # Copy all scripts and source code to the Docker image
1924COPY . .
2025
2126# This build step will cache the dependencies
2227RUN cargo build --release
2328
24- FROM alpine:latest as deploy
29+ # ###################################################################################################
30+ # DEPLOY IMAGE
31+ # ###################################################################################################
32+ FROM alpine:3.18
33+
34+ # Required certs for apk update
35+ COPY ca.crt /root/ca.crt
2536
37+ # Put certs in /etc/ssl/certs location
38+ RUN cat /root/ca.crt >> /etc/ssl/certs/ca-certificates.crt
39+
40+ RUN apk update && apk add --no-cache bash
41+
42+ # Set workdir
2643WORKDIR /app
2744
28- COPY --from=builder \
29- /app/target/release/mutations_of_interest_table \
30- /app/target/release/all_sample_nt_diffs \
31- /app/target/release/all_sample_hamming_dist \
32- /app/target/release/plots \
33- /app/target/release/check_chemistry /app/
45+ # Copy the compiled binary from the builder stage
46+ COPY --from=builder /app/target/release/mira-oxide /app/
3447
3548# Create working directory variable
3649ENV WORKDIR=/data
3750
38- # Set up volume directory in docker
51+ # Set up volume directory in Docker
3952VOLUME ${WORKDIR}
4053
4154# Export project directory to PATH
42- ENV PATH "$PATH:/app"
55+ ENV PATH="$PATH:/app"
56+
57+ # Set bash as the default shell
58+ SHELL ["/bin/bash" , "-c" ]
59+
60+ # Default command to run when the container starts
61+ CMD ["bash" ]
0 commit comments