Last active
September 25, 2019 16:52
-
-
Save zonggen/3801743b56e4d98fde329eb6602dd9d1 to your computer and use it in GitHub Desktop.
Dockerfile for testing FCOS pinger locally
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
FROM rust:1.36.0 | |
WORKDIR /fedora-coreos-pinger | |
COPY . . | |
RUN ./setup.sh | |
RUN cargo build | |
COPY ./dist/config.d/10-default-enable.toml /etc/fedora-coreos-pinger/config.d/10-default-enable.toml |
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
#!/bin/bash | |
set -x | |
mkdir -p /etc/fedora-coreos-pinger/config.d/ | |
mkdir -p ./proc ./etc | |
echo "ignition.platform.id=mock-qemu" > ./proc/cmdline | |
cat > .coreos-aleph-version.json << EOF | |
{ | |
"build": "30.20190923.dev.2-2", | |
"ref": "fedora/x86_64/coreos/testing-devel", | |
"ostree-commit": "93244e2568e83f26fe6ab40bb85788dc066d5d18fce2d0c4a773b6ea193b13c5", | |
"imgid": "fedora-coreos-30.20190923.dev.2-2-qemu.qcow2" | |
} | |
EOF | |
cat > ./etc/os-release << EOF | |
NAME=Fedora | |
VERSION="30.20190924.dev.0 (CoreOS preview)" | |
ID=fedora | |
VERSION_ID=30 | |
VERSION_CODENAME="" | |
PLATFORM_ID="platform:f30" | |
PRETTY_NAME="Fedora 30.20190924.dev.0 (CoreOS preview)" | |
ANSI_COLOR="0;34" | |
LOGO=fedora-logo-icon | |
CPE_NAME="cpe:/o:fedoraproject:fedora:30" | |
HOME_URL="https://fedoraproject.org/" | |
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f30/system-administrators-guide/" | |
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help" | |
BUG_REPORT_URL="https://bugzilla.redhat.com/" | |
REDHAT_BUGZILLA_PRODUCT="Fedora" | |
REDHAT_BUGZILLA_PRODUCT_VERSION=30 | |
REDHAT_SUPPORT_PRODUCT="Fedora" | |
REDHAT_SUPPORT_PRODUCT_VERSION=30 | |
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy" | |
VARIANT="CoreOS preview" | |
VARIANT_ID=coreos | |
OSTREE_VERSION='30.20190924.dev.0' | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To build and run the image & container: