-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.fat-builder
47 lines (36 loc) · 1.4 KB
/
Dockerfile.fat-builder
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
# Copyright (c) 2022 to 2024 MobileCoin Inc.
# hadolint global ignore=DL3008, DL3015, DL3007
# Fat builder image for building and local testing of MobileCoin services.
# Set BASE_IMAGE the rust-base or rust-sgx image and Name/Tag the image
# "FROM mobilecoin/rust-base:latest" as mobilecoin/fat-builder:latest
# "FROM mobilecoin/rust-sgx:latest" as mobilecoin/fat-sgx-builder:latest
ARG BASE_IMAGE=rust-base
ARG BASE_IMAGE_TAG=latest
FROM mobilecoin/${BASE_IMAGE}:${BASE_IMAGE_TAG}
ARG TARGETARCH
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update \
&& apt-get install -y \
nginx \
postgresql \
postgresql-client \
python3 \
python3-pip \
python3-poetry \
psmisc \
sudo \
&& apt-get clean \
&& rm -r /var/lib/apt/lists/*
ARG GO_PKG="go1.22.2.linux-${TARGETARCH}.tar.gz"
RUN curl -sSfL -o go.tgz "https://golang.org/dl/${GO_PKG}" \
&& tar -C /usr/local -xzf go.tgz \
&& rm -rf go.tgz
ENV GOPATH=/opt/go/
ENV PATH="/usr/local/go/bin:${GOPATH}/bin:${PATH}"
RUN mkdir -p "${GOPATH}"
RUN curl -sSLf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash \
&& cargo binstall cargo-nextest@0.9.82 --no-confirm \
&& cargo binstall cbindgen@0.24.2 --no-confirm \
&& cargo binstall sccache@0.3.0 --no-confirm
COPY entrypoint-builder-install.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]