diff --git a/.cargo/config.toml b/.cargo/config.toml index c9ca2d1..78c4f1c 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,2 @@ [alias] -t="test -- --test-threads=1" \ No newline at end of file +t = "test -- --test-threads=1 --nocapture" diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index c8c66cd..0000000 --- a/.dockerignore +++ /dev/null @@ -1,35 +0,0 @@ -# Include any files or directories that you don't want to be copied to your -# container here (e.g., local build artifacts, temporary files, etc.). -# -# For more help, visit the .dockerignore file reference guide at -# https://docs.docker.com/engine/reference/builder/#dockerignore-file - -**/.DS_Store -**/.classpath -**/.dockerignore -**/.env -**/.git -**/.gitignore -**/.project -**/.settings -**/.toolstarget -**/.vs -**/.vscode -**/*.*proj.user -**/*.dbmdl -**/*.jfm -**/charts -**/docker-compose* -**/compose* -**/Dockerfile* -**/node_modules -**/npm-debug.log -**/secrets.dev.yaml -**/values.dev.yaml -/bin -/target -LICENSE -README.md -config.toml -mastodon-data.toml -*.yaml \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e5d130b..940db82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,22 @@ # syntax=docker/dockerfile:1 -FROM rust:1.82.0-slim-bullseye AS build -WORKDIR /app -ARG APP_NAME=mastodon-image-uploader-bot - +FROM rust:1.82.0-slim-bullseye AS deps RUN apt update && apt install pkg-config openssl libssl-dev -y +WORKDIR /app +COPY src src +COPY Cargo.toml Cargo.toml +COPY Cargo.lock Cargo.lock -RUN --mount=type=bind,source=src,target=src \ - --mount=type=bind,source=Cargo.toml,target=Cargo.toml \ - --mount=type=bind,source=Cargo.lock,target=Cargo.lock \ - <