Skip to content

Commit fda1bbe

Browse files
committed
fix: update docker config
1 parent 1e9bda5 commit fda1bbe

3 files changed

Lines changed: 8 additions & 16 deletions

File tree

Dockerfile

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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
66
RUN 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 \
1515
WORKDIR /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)
2121
RUN cargo build --release
@@ -27,15 +27,7 @@ FROM alpine:3.22
2727
# Install runtime dependencies
2828
RUN 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
4133
WORKDIR /app
@@ -44,7 +36,7 @@ WORKDIR /app
4436
COPY --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)
5042
EXPOSE 8086 8096

build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
docker build -t aimerick/linastore-server:latest .

docker-compose.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
services:
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:

0 commit comments

Comments
 (0)