---
title: "Comment by Vladimir Kolev on \"A poor man's API\" | Hashnode"
description: "Great article! I had my look on APISIX for some time and didn&#39;t know about PostgREST. Btw. perhaps your could revisit your Dockerfile and add the apt-get la"
url: "https://hashnode.com/posts/poor-mans-api/637e4be0b19e2ed6be0ad8a1/comment/637f12367acb14d931edfa87"
---

[Discussion](https://hashnode.com/posts/poor-mans-api/637e4be0b19e2ed6be0ad8a1)

Comment [A poor man's API](https://hashnode.com/posts/poor-mans-api/637e4be0b19e2ed6be0ad8a1)

[Vladimir Kolev](https://hashnode.com/@VladoKo)

[Nov 24, 2022](https://hashnode.com/posts/poor-mans-api/637e4be0b19e2ed6be0ad8a1/comment/637f12367acb14d931edfa87)

Great article! I had my look on APISIX for some time and didn't know about PostgREST. Btw. perhaps your could revisit your Dockerfile and add the apt-get layer after the `FROM` otherwise you will have to redownload the apt dependencies on every build for every change. Also `WORKDIR` will create the directory if it doesn't exist.

```
FROM debian:bookworm-slim                                                   #1

RUN apt-get update && \
    apt-get install -y libpq-dev xz-utils

ARG POSTGREST_VERSION=v10.1.1                                               #2
ARG POSTGREST_FILE=postgrest-$POSTGREST_VERSION-linux-static-x64.tar.xz     #2


WORKDIR postgrest

ADD github.com/PostgREST/postgrest/releases/download$POSTGREST_VERSION/$POSTGREST_FILE \
    .                                                                       #3

RUN tar xvf $POSTGREST_FILE && \
    rm $POSTGREST_FILE                                                      #4
```
