chore: update one-shot Dockerfile to not depend on rust:ci (#3133)
* chore: update one-shot Dockerfile to not depend on rust:ci * chore: update Debian to bullseye Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>pull/24376/head
parent
0d500b135b
commit
2976244244
18
Dockerfile
18
Dockerfile
|
@ -1,9 +1,13 @@
|
|||
#syntax=docker/dockerfile:1.2
|
||||
FROM quay.io/influxdb/rust:ci as build
|
||||
FROM rust:1.56-slim-bullseye as build
|
||||
|
||||
# cache mounts below may already exist and owned by root
|
||||
USER root
|
||||
|
||||
RUN apt update \
|
||||
&& apt install --yes build-essential pkg-config libssl-dev clang \
|
||||
&& rm -rf /var/lib/{apt,dpkg,cache,log}
|
||||
|
||||
# Build influxdb_iox
|
||||
COPY . /influxdb_iox
|
||||
WORKDIR /influxdb_iox
|
||||
|
@ -13,20 +17,20 @@ RUN \
|
|||
--mount=type=cache,id=influxdb_iox_git,sharing=locked,target=/usr/local/cargo/git \
|
||||
--mount=type=cache,id=influxdb_iox_target,sharing=locked,target=/influxdb_iox/target \
|
||||
du -cshx /usr/local/cargo/registry /usr/local/cargo/git /influxdb_iox/target && \
|
||||
cargo build --target-dir /influxdb_iox/target --release --features azure,gcp,aws,pprof && \
|
||||
cargo build --target-dir /influxdb_iox/target --release --no-default-features --features=aws,gcp,azure && \
|
||||
cp /influxdb_iox/target/release/influxdb_iox /root/influxdb_iox && \
|
||||
du -cshx /usr/local/cargo/registry /usr/local/cargo/git /influxdb_iox/target
|
||||
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y libssl1.1 libgcc1 libc6 ca-certificates --no-install-recommends \
|
||||
RUN apt update \
|
||||
&& apt install --yes libssl1.1 ca-certificates --no-install-recommends \
|
||||
&& rm -rf /var/lib/{apt,dpkg,cache,log}
|
||||
|
||||
RUN groupadd -g 1500 rust \
|
||||
&& useradd -u 1500 -g rust -s /bin/bash -m rust
|
||||
RUN groupadd --gid 1500 iox \
|
||||
&& useradd --uid 1500 --gid iox --shell /bin/bash --create-home iox
|
||||
|
||||
USER rust
|
||||
USER iox
|
||||
|
||||
RUN mkdir ~/.influxdb_iox
|
||||
RUN ls -la ~/.influxdb_iox
|
||||
|
|
Loading…
Reference in New Issue