Skip to content

Commit

Permalink
fix: docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
Vann-Dev committed Dec 16, 2023
1 parent 0da09f1 commit 63eefef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Build and Push Docker Image
on:
push:
branches:
- main
- development

jobs:
build:
uses: VannApps/workflows/.github/workflows/build-and-push-docker-image.yml@main
secrets: inherit
9 changes: 1 addition & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
FROM rust:1.74.1-slim-bookworm as build

RUN USER=root cargo new --bin image-proxy
WORKDIR /image-proxy
WORKDIR /tmp/build

COPY ./Cargo.lock ./Cargo.lock
COPY ./Cargo.toml ./Cargo.toml

RUN cargo build --release
RUN rm src/*.rs

COPY ./src ./src

RUN rm ./target/release/deps/image-proxy*
RUN cargo build --release

FROM rust:1.74.1-slim-bookworm
Expand Down

0 comments on commit 63eefef

Please sign in to comment.