timewarrior/docker/timew.dockerfile
Thomas Lauf ca5de02c56 Add workflow for Timewarrior Docker image
The workflow is triggered by a successful run of the test suite and creates a Docker image with a Timewarrior installation of the current branch (restricted to develop/stable)

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2023-01-05 23:20:00 +01:00

35 lines
675 B
Docker

FROM ubuntu:22.04 AS base
FROM base AS builder
ENV DEBIAN_FRONTEND noninteractive
RUN ( apt-get update && yes | unminimize ) && \
apt-get install -y \
cmake \
g++ \
git
# Setup language environment
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
# Add source directory
ADD .. /root/code/
WORKDIR /root/code/
# Build Timewarrior
RUN git clean -dfx && \
git submodule init && \
git submodule update && \
cmake -DCMAKE_BUILD_TYPE=release . && \
make -j8
FROM base AS runner
# Install Timewarrior
COPY --from=builder /root/code/src/timew /usr/local/bin
# Initialize Timewarrior
RUN timew :yes