Skip to content

Commit

Permalink
prepared docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Pugma committed Sep 27, 2024
1 parent 8f8c7ce commit 3615978
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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/go/build-context-dockerignore/

**/.DS_Store
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/charts
**/docker-compose*
**/compose.y*ml
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/secrets.dev.yaml
**/values.dev.yaml
/bin
/target
LICENSE
README.md
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# server のビルド
FROM rust:1.81 AS builder

WORKDIR /app/server

RUN --mount=type=bind,target=.,source=./server \
--mount=type=cache,target=/usr/local/cargo/registry \
cargo fetch

RUN --mount=type=bind,target=.,source=./server,rw \
--mount=type=cache,target=/usr/local/cargo/registry\
cargo build --release && \
mv target/release/rust-traQ-gazer /tmp/rust-traQ-gazer

# 最終的な配信用
FROM gcr.io/distroless/cc-debian12

WORKDIR /

COPY --from=builder /tmp/rust-traQ-gazer app

ENV RUST_BACKTRACE=full

ENTRYPOINT [ "./app" ]

0 comments on commit 3615978

Please sign in to comment.