move git submodule step into dockerfile

This commit is contained in:
Maple 2025-10-16 11:54:31 +02:00
commit 4228f1079b
2 changed files with 4 additions and 2 deletions

View file

@ -1,7 +1,7 @@
image: docker:24.0.5
before_script:
- git submodule update --init
-
stages:
- build

View file

@ -2,12 +2,14 @@
FROM rust:alpine as builder
RUN apk add openssl-dev musl-dev openssl-libs-static lld
RUN apk add openssl-dev musl-dev openssl-libs-static lld git
WORKDIR /app
COPY . .
RUN git submodule update --init
RUN OPENSSL_LIB_DIR=/usr/lib OPENSSL_INCLUDE_DIR=/usr/include/openssl OPENSSL_STATIC=1 cargo build --release --target x86_64-unknown-linux-musl
FROM scratch as final