-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
53 lines (44 loc) · 1.52 KB
/
Dockerfile
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM ubuntu:focal-20230605
ENV DEBIAN_FRONTEND=noninteractive
ENV ACCEPT_EULA=y
ENV POSTGREST_VERSION 11.2.2
RUN mkdir -p /app && \
mkdir -p /opt/hoop/sessions && \
apt-get update -y && \
apt-get install -y \
xz-utils \
locales \
tini \
openssh-client \
procps \
gettext-base \
curl
RUN URL= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) URL="https://github.com/PostgREST/postgrest/releases/download/v$POSTGREST_VERSION/postgrest-v$POSTGREST_VERSION-linux-static-x64.tar.xz";; \
arm64) URL="https://github.com/PostgREST/postgrest/releases/download/v$POSTGREST_VERSION/postgrest-v$POSTGREST_VERSION-ubuntu-aarch64.tar.xz";; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -sL $URL -o postgrest.tar.xz && \
tar -xf postgrest.tar.xz && rm -f postgrest.tar.xz && \
mv postgrest /usr/local/bin/postgrest && \
chmod 0755 /usr/local/bin/postgrest && \
postgrest --version
RUN mkdir -p /app && \
mkdir -p /opt/hoop/sessions
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
COPY rootfs /
COPY dist/binaries/ /tmp/
RUN tar -xf /tmp/hoop_*_$(uname -s)_$(uname -m).tar.gz -C /app/ && \
chown root:root /app/hoop && \
chmod 755 /app/hoop && \
rm -rf /tmp/* && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists/*
EXPOSE 8009
EXPOSE 8010
ENV PATH="/app:${PATH}"
ENTRYPOINT ["tini", "--"]