forked from localstack/localstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.rh
64 lines (51 loc) · 2.13 KB
/
Dockerfile.rh
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
54
55
56
57
58
59
60
61
62
63
64
# Disclaimer: This Dockerfile is used to regularly test compatibility with RedHat based images.
# It is _not_ the usually Dockerfile and currently _not_ officially supported.
FROM redhat/ubi8
LABEL authors="LocalStack Contributors"
LABEL maintainer="LocalStack Team ([email protected])"
LABEL description="LocalStack Docker image"
RUN dnf install -y cyrus-sasl-devel gcc gcc-c++ git iputils make npm openssl-devel procps zip \
&& dnf clean all \
&& rm -rf /var/cache/yum
RUN dnf install -y bzip2-devel sqlite-devel libffi-devel \
&& curl https://www.python.org/ftp/python/3.10.4/Python-3.10.4.tgz -o Python-3.10.4.tgz \
&& tar xzf Python-3.10.4.tgz \
&& cd Python-3.10.4 \
&& ./configure \
&& make -j $(nproc) \
&& make install \
&& cd .. \
&& rm -rf Python-3.10.4 \
&& rm Python-3.10.4.tgz \
&& dnf remove -y bzip2-devel sqlite-devel libffi-devel \
&& dnf clean all \
&& rm -rf /var/cache/yum
RUN python3 -m pip install -U setuptools pip wheel
# Create a localstack user
RUN useradd -ms /bin/bash localstack
# Install python packages
RUN python3 -m pip install supervisor awscli awscli-local 'localstack[runtime]>=0.14.0' 'localstack-ext[runtime]>=0.14.0' --upgrade --no-cache-dir
# Install the basic libraries
RUN python3 -m localstack.services.install libs
# install entrypoint script
ADD bin/docker-entrypoint.sh /usr/local/bin/
# add the script to start LocalStack and add the supervisor.d config
RUN mkdir -p /opt/code/localstack/bin/
WORKDIR /opt/code/localstack/
ADD bin/localstack /opt/code/localstack/bin/
ADD bin/supervisord.conf /etc/supervisord.conf
# Set default settings
ENV USER=localstack
ENV PYTHONUNBUFFERED=1
ENV EDGE_BIND_HOST=0.0.0.0
ENV LOCALSTACK_HOSTNAME=localhost
# Add the build date and git hash at last (changes everytime)
ARG LOCALSTACK_BUILD_DATE
ARG LOCALSTACK_BUILD_GIT_HASH
ENV LOCALSTACK_BUILD_DATE=${LOCALSTACK_BUILD_DATE}
ENV LOCALSTACK_BUILD_GIT_HASH=${LOCALSTACK_BUILD_GIT_HASH}
# expose ports
EXPOSE 4510-4559 4566
HEALTHCHECK --interval=10s --start-period=15s --retries=5 --timeout=5s CMD ./bin/localstack status services
# define command at startup
ENTRYPOINT ["docker-entrypoint.sh"]