File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Multi-stage build for LiNa Store
22# Stage 1: Build stage
3- FROM rust:1.87.0-alpine3.22 as builder
3+ FROM rust:1.87.0-alpine3.22 AS builder
44
55# Install build dependencies
66RUN apk add --no-cache \
7- pkg-config \
7+ pkgconfig \
88 openssl-dev \
99 musl-dev \
1010 sqlite-dev \
@@ -15,7 +15,7 @@ RUN apk add --no-cache \
1515WORKDIR /app
1616
1717# Copy Cargo files for dependency caching
18- COPY src/ linabase/ Cargo.toml Cargo.lock .
18+ COPY . .
1919
2020# Build dependencies only (this layer will be cached if Cargo files don't change)
2121RUN cargo build --release
@@ -27,15 +27,7 @@ FROM alpine:3.22
2727# Install runtime dependencies
2828RUN apk add --no-cache \
2929 ca-certificates \
30- openssl \
31- sqlite
32-
33- # Create non-root user for security
34- RUN addgroup -g 1000 linastore && adduser -D -s /bin/sh -u 1000 -G linastore linastore
35-
36- # Create necessary directories
37- RUN mkdir -p /app/data /app/logs && \
38- chown -R linastore:linastore /app
30+ openssl
3931
4032# Set working directory
4133WORKDIR /app
@@ -44,7 +36,7 @@ WORKDIR /app
4436COPY --from=builder /app/target/release/linastore-server /usr/local/bin/
4537
4638# Switch to non-root user
47- USER linastore
39+ USER root
4840
4941# Expose default ports (adjust based on your application needs)
5042EXPOSE 8086 8096
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ docker build -t aimerick/linastore-server:latest .
Original file line number Diff line number Diff line change 11services :
22 linastore :
3- build :
4- context : .
5- dockerfile : Dockerfile
3+ image : aimerick/linastore-server:latest
64 container_name : linastore-server
75 restart : unless-stopped
86 environment :
You can’t perform that action at this time.
0 commit comments