32 lines
535 B
Docker
32 lines
535 B
Docker
|
FROM arm64v8/rust:1.42.0-buster AS builder
|
||
|
|
||
|
ARG BUILD_DATE
|
||
|
|
||
|
RUN apt-get update && \
|
||
|
apt-get install -y libpq-dev && \
|
||
|
cargo install diesel_cli --no-default-features --features postgres
|
||
|
|
||
|
FROM arm64v8/ubuntu:19.10
|
||
|
|
||
|
ARG UID=991
|
||
|
ARG GID=991
|
||
|
|
||
|
RUN \
|
||
|
apt-get update && \
|
||
|
apt-get upgrade -y
|
||
|
|
||
|
RUN \
|
||
|
addgroup --gid "${GID}" relay && \
|
||
|
adduser \
|
||
|
--disabled-password \
|
||
|
--gecos "" \
|
||
|
--ingroup relay \
|
||
|
--uid "${UID}" \
|
||
|
relay
|
||
|
|
||
|
COPY --from=builder /usr/local/cargo/bin/diesel /usr/local/bin/diesel
|
||
|
|
||
|
USER relay
|
||
|
|
||
|
CMD ["relay"]
|