forked from qemu-bsd-user/qemu-bsd-user
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add separate docker file to build FreeBSD/base container.
- Loading branch information
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# syntax=docker/dockerfile:1.7-labs | ||
|
||
ARG BASE_IMAGE="debian:sid-slim" | ||
ARG BUILD_IMAGE="ghcr.io/sobomax/qemu-bsd-user-l4b:latest-debian-sid-slim" | ||
FROM ${BASE_IMAGE} AS base | ||
LABEL maintainer="Maksym Sobolyev <sobomax@FreeBSD.org>" | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG APT_INSTALL="apt-get install --no-install-recommends -y" | ||
ARG APT_UPDATE="apt-get -y update -qq" | ||
RUN ${APT_UPDATE} | ||
ARG BUILD_PKGS="ca-certificates curl tar xz-utils" | ||
RUN ${APT_INSTALL} ${BUILD_PKGS} | ||
|
||
RUN mkdir -p /tmp/world | ||
RUN curl -o - -L https://download.freebsd.org/releases/amd64/14.1-RELEASE/base.txz | \ | ||
tar -C /tmp/world --exclude ./sys -xJf - | ||
|
||
ARG BUILD_IMAGE | ||
FROM ${BUILD_IMAGE} as build | ||
FROM scratch as image | ||
ENV QEMU_BIN_DIR=/usr/bin | ||
COPY --from=base /tmp/world / | ||
COPY --from=build ${QEMU_BIN_DIR}/qemu-freebsd_x86_64-static ${QEMU_BIN_DIR} | ||
RUN /bin/echo "Hello Docker! :^)" | ||
ENTRYPOINT ["/bin/sh"] |