Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add core metadata #172

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ==========================================================================
# ## Cmfive docker image ##
# ## Cosine docker image ##
# ==========================================================================

# This image provides a fully working cmfive instance
# This image provides a fully working Cosine instance

# It provides the following build arguments:
# - CORE_BRANCH: The branch to clone from the cmfive-core repository
Expand All @@ -29,16 +29,20 @@ RUN apk --no-cache add \
ARG BUILT_IN_CORE_BRANCH=main
RUN git clone --depth 1 https://github.com/2pisoftware/cmfive-core.git -b $BUILT_IN_CORE_BRANCH

# Get the repo metadata
RUN cd /cmfive-core && \
git log -1 --pretty=format:"CORE_HASH=\"%H\"%nCORE_COMMIT_MSG=\"%s\"%nCORE_REF=\"%D\"" > /.core-metadata

# Compile the theme
RUN cd /cmfive-core/system/templates/base && \
npm ci && \
npm run production

# --------------------------------------------------------------------------
# == Cmfive stage ==
# == Cosine stage ==
# --------------------------------------------------------------------------

# This stage builds the final cmfive image
# This stage builds the final Cosine image

# Use the Alpine Linux base image
FROM alpine:3.19
Expand Down Expand Up @@ -125,6 +129,12 @@ COPY --chown=cmfive:cmfive \
/cmfive-core/system/ \
composer/vendor/2pisoftware/cmfive-core/system/

# Metadata for core
COPY --chown=cmfive:cmfive \
--from=core \
/.core-metadata \
/.core-metadata

# Link system
RUN ln -s composer/vendor/2pisoftware/cmfive-core/system/ system

Expand Down
Loading