chatai/postgrest_v12.2.8/Dockerfile_build_postrest_bin

39 lines
849 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 使用 Ubuntu 22.04 作为基础镜像
FROM ubuntu:22.04
# 设置环境变量,避免时区配置的交互提示
ENV DEBIAN_FRONTEND=noninteractive
# 安装必要的系统依赖(包括构建工具链)
RUN apt-get update && apt-get install -y \
build-essential \
libpq-dev \
zlib1g-dev \
pkg-config \
postgresql \
curl \
git \
wget \
ca-certificates \
libffi-dev \
libssl-dev \
libgmp-dev \
libtinfo6 \
&& rm -rf /var/lib/apt/lists/*
# 安装 StackHaskell 构建工具)
RUN curl -sSL https://get.haskellstack.org/ | sh
# 设置工作目录
WORKDIR /app
# 复制当前目录的内容到容器的 /app 目录
COPY . /app
# 公开端口(假设 PostgREST 在 3000 端口上运行)
EXPOSE 3000
# 设置容器启动时的默认命令,进入交互式 shell
CMD ["/bin/bash"]