-
Notifications
You must be signed in to change notification settings - Fork 2
/
Containerfile.admin
51 lines (47 loc) · 1.53 KB
/
Containerfile.admin
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
ARG GO_VERSION=1.22
# Switch back to Red Hat go-toolset when it supports go 1.22
#FROM registry.access.redhat.com/ubi8/go-toolset:latest AS builder
FROM docker.io/golang:${GO_VERSION}-bullseye as builder
WORKDIR /sandbox/
COPY ./ ./
RUN make
FROM registry.access.redhat.com/ubi8/ubi:latest AS deploy
RUN dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm \
&& dnf install -y \
bash \
bind-utils \
curl \
findutils \
gcc \
git \
jq \
nc \
net-tools \
openssl \
postgresql \
python39 \
python39-pip \
rsync \
tar \
unzip \
vim \
wget \
&& dnf clean all \
&& VERSION=4.1.0 \
&& curl --silent --location https://github.com/Orange-OpenSource/hurl/releases/download/$VERSION/hurl-$VERSION-x86_64-unknown-linux-gnu.tar.gz \
| tar -xz -C /usr/local/bin --strip-components=1 --wildcards '*/hurl' '*/hurlfmt'
COPY --from=docker.io/migrate/migrate /usr/local/bin/migrate /usr/local/bin/migrate
WORKDIR /sandbox/
USER ${USER_UID}
COPY build/github_known_hosts /ssh/known_hosts
env SSH_KNOWN_HOSTS /ssh/known_hosts
COPY --from=builder /sandbox/build/sandbox-* ./
COPY --from=builder /sandbox/tools ./tools
COPY --from=builder /sandbox/tests ./tests
COPY --from=builder /sandbox/db ./db
CMD ["/bin/bash"]
ENV DESCRIPTION="Image for Admins to interact with the Sandbox API"
LABEL name="rhpds/sandbox-admin" \
maintainer="Red Hat Demo Platform" \
description="${DESCRIPTION}" \
summary="${DESCRIPTION}"