-
Notifications
You must be signed in to change notification settings - Fork 272
Expand file tree
/
Copy pathDockerfile.e2e
More file actions
68 lines (56 loc) · 2.64 KB
/
Dockerfile.e2e
File metadata and controls
68 lines (56 loc) · 2.64 KB
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
65
66
67
68
# syntax=docker/dockerfile:1
# check=skip=SecretsUsedInArgOrEnv
#
# Copyright (C) 2022, Berachain Foundation. All rights reserved.
# See the file LICENSE for licensing terms.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#######################################################
### Stage 0 - Build Arguments ###
#######################################################
ARG IMAGE_NAME=beacond
ARG VERSION=local-version
FROM ${IMAGE_NAME}:${VERSION}
###########################################################################
### Stage 1 - Add entrypoint_cmt_e2e.sh requirements to beacond ###
###########################################################################
# Copy beacond because entrypoint_cmt_e2e.sh searches in ./build/bin
RUN mkdir -p /build/bin && cp /usr/bin/beacond /build/bin
# Add files used by entrypoint_cmt_e2e.sh. Start the build process from the testing folder.
COPY files/ /testing/files/
COPY networks/ /testing/networks/
COPY files/entrypoint_cmt_e2e.sh /usr/bin/entrypoint-builtin
RUN chmod +x /usr/bin/entrypoint-builtin
# Configure entrypoint_cmt_e2e.sh
ENV RPC_PREFIX="http://"
ENV RPC_DIAL_URL="172.17.0.1:8551"
# For local runs on macos:
#"host.docker.internal:8551"
# for CI this is the address of the docker host:
#"172.17.0.1:8551"
ENV NON_INTERACTIVE=1
ENV JWT_SECRET_PATH="/testing/files/jwt.hex"
###########################################################################
### Stage 2 - Add consensus e2e test details to beacond ###
###########################################################################
# Add iputils-ping and iproute2 for simulated network delay.
RUN apk add --no-cache iputils-ping iproute2
# Set up runtime directory.
WORKDIR /
VOLUME /cometbft
ENV CMTHOME=/cometbft
ENV HOMEDIR=/cometbft
ENV GORACE="halt_on_error=1"
EXPOSE 26656 26657 26660 6060 3500
ENTRYPOINT ["/testing/files/entrypoint_cmt_e2e.sh"]
CMD ["devnet"]
STOPSIGNAL SIGTERM