-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (20 loc) · 1.01 KB
/
Dockerfile
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
# Build the Rust application
FROM rust:latest as builder
# Set working directory within the container
WORKDIR /app
# Copy all files from host directory to the container working dir
COPY . .
# Build program
RUN cargo build --release
# Create a minimal runtime image
FROM ubuntu
# Set working directory within the container
WORKDIR /app
# Update all packages, install rust, and install texlive in order to convert .tex -> .pdf
RUN apt-get update -y && apt-get upgrade -y && apt-get install texlive-latex-base -y && apt-get install texlive-fonts-recommended -y && apt-get install texlive-fonts-extra -y && apt-get install texlive-latex-extra -y
# Copy the built application from the builder stage
COPY --from=builder /app/target/release/jakes-jenerator /usr/local/bin/jakes-jenerator
# Copy the source files if needed (for LaTeX files, etc.)
COPY . .
# Command to run the application and convert .tex to .pdf
CMD ["sh", "-c", "/usr/local/bin/jakes-jenerator && pdflatex -output-directory=src/output src/output/jakes_resume.tex"]