Skip to content

Commit 091f00e

Browse files
committedMay 28, 2024
update UI Dockerfile
1 parent b7f7b1f commit 091f00e

File tree

2 files changed

+17
-45
lines changed

2 files changed

+17
-45
lines changed
 

‎ui/Dockerfile

Lines changed: 16 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,25 @@
1-
ARG BASE_IMAGE=registry.opensource.zalan.do/library/alpine-3.15:latest
2-
ARG NODE_IMAGE=node:14.21.2-alpine
3-
4-
FROM $NODE_IMAGE AS build
5-
6-
COPY . /workdir
7-
WORKDIR /workdir/app
8-
9-
RUN npm install &&\
10-
npm run build
11-
12-
FROM $BASE_IMAGE
131

2+
FROM registry.opensource.zalan.do/library/python-3.11-slim:latest
143
LABEL maintainer="Team ACID @ Zalando <team-acid@zalando.de>"
154

165
EXPOSE 8081
6+
WORKDIR /app
7+
8+
RUN apt-get -qq -y update \
9+
# https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary
10+
&& apt-get -qq -y install --no-install-recommends g++ libpq-dev python3-dev python3-distutils \
11+
&& apt-get -qq -y clean \
12+
&& rm -rf /var/lib/apt/lists/*
1713

18-
RUN \
19-
apk add --no-cache \
20-
alpine-sdk \
21-
autoconf \
22-
automake \
23-
ca-certificates \
24-
libffi-dev \
25-
libtool \
26-
python3 \
27-
python3-dev \
28-
zlib-dev \
29-
&& \
30-
python3 -m ensurepip && \
31-
rm -r /usr/lib/python*/ensurepip && \
32-
pip3 install --upgrade \
33-
gevent \
34-
jq \
35-
pip \
36-
setuptools \
37-
&& \
38-
rm -rf \
39-
/root/.cache \
40-
/tmp/* \
41-
/var/cache/apk/*
14+
COPY requirements.txt .
15+
COPY start_server.sh .
16+
RUN pip install -r requirements.txt
4217

43-
COPY requirements.txt /
44-
COPY start_server.sh /
45-
RUN pip3 install -r /requirements.txt
18+
COPY wal-e-master wal_e
19+
RUN pip install -e wal_e
20+
COPY operator_ui operator_ui/
4621

47-
COPY operator_ui /operator_ui
48-
COPY --from=build /workdir/operator_ui/static/build /operator_ui/static/build
4922
ARG VERSION=dev
50-
RUN sed -i "s/__version__ = .*/__version__ = '${VERSION}'/" /operator_ui/__init__.py
23+
RUN sed -i "s/__version__ = .*/__version__ = '${VERSION}'/" operator_ui/__init__.py
5124

52-
WORKDIR /
53-
CMD ["/usr/bin/python3", "-m", "operator_ui"]
25+
CMD ["python", "-m", "operator_ui"]

‎ui/operator_ui/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
SUPERUSER_TEAM = getenv('SUPERUSER_TEAM', 'acid')
7878
TARGET_NAMESPACE = getenv('TARGET_NAMESPACE')
7979
GOOGLE_ANALYTICS = getenv('GOOGLE_ANALYTICS', False)
80-
MIN_PODS= getenv('MIN_PODS', 2)
80+
MIN_PODS = getenv('MIN_PODS', 2)
8181
RESOURCES_VISIBLE = getenv('RESOURCES_VISIBLE', True)
8282
CUSTOM_MESSAGE_RED = getenv('CUSTOM_MESSAGE_RED', '')
8383

0 commit comments

Comments
 (0)