27 lines
656 B
Text
27 lines
656 B
Text
# SPDX-FileCopyrightText: 2021 Heiko Schaefer <heiko@schaefer.name>
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
FROM registry.gitlab.com/hkos/openpgp-card-images/smartpgp
|
|
|
|
USER root
|
|
|
|
RUN useradd -ms /bin/bash ocard \
|
|
&& apt update -y -qq \
|
|
&& apt install -y -qq cargo rustc nettle-dev libclang-dev
|
|
|
|
USER ocard
|
|
WORKDIR /home/ocard
|
|
|
|
RUN git clone https://gitlab.com/hkos/openpgp-card \
|
|
&& cd openpgp-card/card-functionality \
|
|
&& cargo build \
|
|
&& true
|
|
|
|
COPY card-functionality/docker/test-smartpgp.toml openpgp-card/card-functionality/config/test-cards.toml
|
|
|
|
USER root
|
|
WORKDIR /
|
|
COPY card-functionality/docker/run.sh .
|
|
|
|
ENV bin import
|
|
CMD /bin/sh /run.sh ${bin}
|