-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (20 loc) · 833 Bytes
/
Dockerfile
File metadata and controls
31 lines (20 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM golang:1.17-bullseye AS builder
RUN apt update && apt install -y cmake libcurl4-openssl-dev \
libpq-dev rapidjson-dev unixodbc unixodbc-dev libsqlite3-dev
WORKDIR /usr/src/ldp
COPY . /usr/src/ldp
RUN ./version.sh && \
mkdir -p build && \
cd build && \
cmake -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql .. && \
make
FROM debian:bullseye-slim
LABEL org.opencontainers.image.source="https://github.com/library-data-platform/ldp"
ENV DATADIR=/var/lib/ldp
COPY --from=builder /usr/src/ldp/build/ldp /usr/local/bin/ldp
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN apt update && apt install -y && apt install -y libcurl4 libpq5 && \
mkdir $DATADIR && \
chmod +x /usr/local/bin/docker-entrypoint.sh
VOLUME $DATADIR
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]