add additional tests
This commit is contained in:
parent
1f44df6c32
commit
ac45dfd758
|
@ -0,0 +1,16 @@
|
|||
FROM ocirep/busybox as build
|
||||
COPY --from=ocirep/gcc . /
|
||||
COPY --from=ocirep/musl . /
|
||||
COPY --from=ocirep/binutils . /
|
||||
COPY . .
|
||||
RUN set -eux; \
|
||||
gcc main.c -static -o main; \
|
||||
mkdir -p $HOME/rootfs/etc; \
|
||||
echo "nogroup:*:100:nobody" > ~/rootfs/etc/group; \
|
||||
echo "nobody:*:100:100:::" > ~/rootfs/etc/passwd; \
|
||||
cp main $HOME/rootfs/
|
||||
|
||||
FROM scratch
|
||||
COPY --from=build --chown=100:100 /home/user/rootfs /
|
||||
USER 100:100
|
||||
ENTRYPOINT ["/main"]
|
|
@ -0,0 +1,5 @@
|
|||
#include <stdio.h>
|
||||
int main() {
|
||||
printf("Success\n");
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
FROM ocirep/busybox as build
|
||||
COPY . .
|
||||
RUN set -eux; \
|
||||
mkdir -p $HOME/rootfs/etc; \
|
||||
echo "nogroup:*:100:nobody" > ~/rootfs/etc/group; \
|
||||
echo "nobody:*:100:100:::" > ~/rootfs/etc/passwd; \
|
||||
cp main.py $HOME/rootfs/
|
||||
|
||||
FROM scratch
|
||||
COPY --from=build --chown=100:100 /home/user/rootfs /
|
||||
COPY --from=ocirep/perl . /
|
||||
USER 100:100
|
||||
ENTRYPOINT ["/usr/bin/perl"]
|
||||
CMD ["/main.pl"]
|
|
@ -0,0 +1,4 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
print("Success\n");
|
|
@ -0,0 +1,14 @@
|
|||
FROM ocirep/busybox as build
|
||||
COPY . .
|
||||
RUN set -eux; \
|
||||
mkdir -p $HOME/rootfs/etc; \
|
||||
echo "nogroup:*:100:nobody" > ~/rootfs/etc/group; \
|
||||
echo "nobody:*:100:100:::" > ~/rootfs/etc/passwd; \
|
||||
cp main.py $HOME/rootfs/
|
||||
|
||||
FROM scratch
|
||||
COPY --from=build --chown=100:100 /home/user/rootfs /
|
||||
COPY --from=ocirep/python . /
|
||||
USER 100:100
|
||||
ENTRYPOINT ["/usr/bin/python"]
|
||||
CMD ["/main.py"]
|
|
@ -0,0 +1 @@
|
|||
print("Success")
|
Reference in New Issue