diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index ae2bfd7..16a0910 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -2,19 +2,10 @@ name: Release on: workflow_dispatch: inputs: - lapdev_version: - description: "Lapdev version for release" + version: + description: "Enter the version to build" required: true default: "v0.1.0" - push: - tags: - - "v*" - -defaults: - run: - shell: bash - working-directory: ./lapdev - env: GITHUB_TOKEN: ${{ secrets.PACKAGE_TOKEN }} @@ -44,7 +35,6 @@ jobs: platforms: linux/amd64 push: true build-args: | - HUGO_VERSION=0.138.0 - NODE_VERSION=22.5.0 + LAP_VER=${{ github.event.inputs.version }} tags: | - git.myco.systems/mycosystems/web-ci:latest + fung.uy/mycosystems/lapdev:${{ github.event.inputs.version }} diff --git a/Dockerfile b/Dockerfile index e69de29..6e7e360 100644 --- a/Dockerfile +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM debian:bookworm-slim + +ARG LAP_VER +ENV VERSION=${LAP_VER} + +# Install required dependencies +RUN apt update && \ + apt install -y curl + +RUN echo "Installing lapdev package from GitHub." && \ + curl -sL -o /tmp/lapdev_${VERSION}-1_amd64.deb https://github.com/lapce/lapdev/releases/download/v${VERSION}/lapdev_${VERSION}-1_amd64.deb && \ + sudo apt install -y /tmp/lapdev_${VERSION}-1_amd64.deb + +RUN apt-get clean + +RUN rm /tmp/* + +RUN useradd -r -s /bin/false lapdev && \ + mkdir -p /var/lib/lapdev && \ + chown lapdev:lapdev /var/lib/lapdev + +WORKDIR /var/lib/lapdev + +CMD ["/usr/bin/lapdev"]