Skip to content

Commit e2d7696

Browse files
authored
add Dockerfile (#8)
1 parent bf10406 commit e2d7696

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
target
2+
.git
3+
.github
4+
.claude

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Stage 1: Build the application
2+
FROM rust:alpine AS builder
3+
4+
# Install build dependencies
5+
RUN apk add --no-cache musl-dev
6+
7+
# Create a new empty shell project
8+
WORKDIR /usr/src/roy
9+
COPY . .
10+
11+
# Build for release
12+
RUN cargo build --release
13+
14+
# Stage 2: Create the final, lightweight image
15+
FROM alpine:latest
16+
17+
# Copy the compiled binary from the builder stage
18+
COPY --from=builder /usr/src/roy/target/release/roy /usr/local/bin/roy
19+
20+
# Expose the port the app runs on
21+
EXPOSE 8000
22+
23+
# Set the entrypoint
24+
CMD ["roy", "-vvv"]

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub struct Args {
3434
#[arg(long, help = "Port to listen on", default_value = "8000")]
3535
pub port: u16,
3636

37-
#[arg(long, help = "Address to listen on", default_value = "127.0.0.1")]
37+
#[arg(long, help = "Address to listen on", default_value = "0.0.0.0")]
3838
pub address: IpAddr,
3939

4040
#[arg(

0 commit comments

Comments
 (0)