forked from localstack/localstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.rh
46 lines (36 loc) · 1.55 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
# 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 python38-devel zip \
&& dnf clean all \
&& rm -rf /var/cache/yum
# 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
# define command at startup
ENTRYPOINT ["docker-entrypoint.sh"]