-
Notifications
You must be signed in to change notification settings - Fork 9
/
Containerfile
36 lines (30 loc) · 1.05 KB
/
Containerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# With Podman (Tested on Fedora 36)
# podman build --tag ghcr.io/emporous/site .
# podman run -it --rm --name site -p 3000:3000 --volume $(pwd):/src --security-opt label=disable --pull=never ghcr.io/emporous/site
# With Docker (Tested on MacOS)
# docker build -f Containerfile -t ghcr.io/emporous/site .
# docker run -it --rm --name site --publish 3000:3000 --volume $(pwd):/src ghcr.io/emporous/site
FROM quay.io/fedora/fedora:latest AS builder
ENV ROOTFS_PATH="/rootfs"
ENV DNF_FLAGS="\
--setopt install_weak_deps=false \
--releasever rawhide \
-y --nodocs --nogpg \
"
ENV RPM_LIST="\
npm \
glibc-minimal-langpack \
coreutils-single \
openssl \
"
RUN set -ex \
&& mkdir -p ${ROOTFS_PATH} \
&& dnf install --installroot ${ROOTFS_PATH} ${DNF_FLAGS} ${RPM_LIST} \
&& dnf clean all --installroot ${ROOTFS_PATH} \
&& rm -rf ${ROOTFS_PATH}/var/cache/* \
&& echo
FROM scratch
COPY --from=builder /rootfs /
WORKDIR /src
ENTRYPOINT ["bash", "-c", "npm install && npm run start"]
LABEL org.opencontainers.image.source https://github.com/emporous/emporous.io