blob: 4f5fbbdc350363c2bcb1f0f7670658f621a0ed9a [file] [log] [blame]
Leonardo Sandoval98d25902020-05-24 19:50:27 -07001FROM ${OS}:${OS_VER} as FVP
2
3ENV DEBIAN_FRONTEND=noninteractive
4ENV PKG_DEPS="\
5 bc \
6 ca-certificates \
7 curl \
8 libatomic1 \
9 libdbus-1-3 \
10 openssh-server \
11 telnet \
12 xterm \
13"
14
15RUN set -e ;\
16 apt update -q=2 ;\
17 apt full-upgrade -q=2 --yes ;\
18 apt install -q=2 --yes --no-install-recommends ${PKG_DEPS} ;\
19 # Cleanup
20 apt clean ;\
21 rm -rf /var/lib/apt/lists/* /tmp/*
22
23FROM FVP
24
25WORKDIR ${MODEL_DIR}
26
27COPY setup-sshd /usr/sbin/setup-sshd
Paul Sokolovsky30619ea2022-12-01 17:13:15 +030028COPY stdout-flush-wrapper.sh /usr/bin/stdout-flush-wrapper.sh
Leonardo Sandoval98d25902020-05-24 19:50:27 -070029
30# Add the FVP model tarball
31# NOTE: some tarballs contain an installer script others don't, so it may be the case
32# that the ADD instruction do install the model under /opt/model
Paul Sokolovskyb5cc7742022-11-16 22:08:00 +030033ADD ${TARBALL} .
Leonardo Sandoval98d25902020-05-24 19:50:27 -070034
35# Install packages and model
36RUN ${MODEL_DIR}/${MODEL}.sh \
37 --i-agree-to-the-contained-eula \
38 --verbose \
39 --destination ${MODEL_DIR}/${MODEL} && rm -f ${MODEL_DIR}/${MODEL}.sh || true
40
41EXPOSE 22
42ENTRYPOINT ["/usr/sbin/setup-sshd"]