init
This commit is contained in:
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
FROM alpine:latest AS rootfs-builder
|
||||
|
||||
ENV CLOUD_CONFIG_REPO=https://git.sfclub.cc/cloud/bearnet
|
||||
ENV CLOUD_CONFIG_REVISION=wish
|
||||
ENV CLOUD_GATEWAY_ADDRESS=10.0.0.119
|
||||
|
||||
COPY /image /kitchen
|
||||
COPY ./scripts/orchestrate.py /kitchen/overlay/daemon/orchestrate.py
|
||||
COPY bot-gpg-key.asc /kitchen/overlay/root/gpg-key.asc
|
||||
RUN sed -i "s/_REPO_/$CLOUD_CONFIG_REPO/g" /kitchen/overlay/daemon/update.sh \
|
||||
sed -i "s/_REVISION_/$CLOUD_CONFIG_REVISION/g" /kitchen/overlay/daemon/update.sh \
|
||||
sed -i "s/GATEWAY_ADDRESS/$CLOUD_GATEWAY_ADDRESS/g" /kitchen/overlay/etc/dhcp/dhclient.conf
|
||||
RUN apk update && apk add alpine-make-vm-image \
|
||||
cd /kitchen && make build extract-kernel && mkdir /image && cp ./$IMAGE_NAME* /image
|
||||
|
||||
FROM alpine:latest AS hypervisor
|
||||
ADD ./scripts/setup-hypervisor.sh /setup.sh
|
||||
# Download cloud hypervisor
|
||||
RUN apk update && apk add bash curl jq tini && sh /setup.sh && rm /setup.sh && mkdir /app
|
||||
COPY --from=rootfs-builder /image /image
|
||||
COPY ./scripts/entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/usr/bin/tini", "/entrypoint.sh"]
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user