Bladeren bron

feat: add official Docker image (#137)

tags/v0.10.0
Nic 3 jaren geleden
committed by GitHub
bovenliggende
commit
a6d3575977
Geen bekende sleutel gevonden voor deze handtekening in de database GPG sleutel-ID: 4AEE18F83AFDEB23
3 gewijzigde bestanden met toevoegingen van 64 en 0 verwijderingen
  1. +28
    -0
      .github/workflows/release.yml
  2. +27
    -0
      Dockerfile
  3. +9
    -0
      README.md

+ 28
- 0
.github/workflows/release.yml Bestand weergeven

@@ -81,3 +81,31 @@ jobs:
run: |
make POEDITOR_API_ACCESS="${POEDITOR_API_ACCESS}" POEDITOR_PROJECT_ID="306433" build
twine upload dist/*
docker:
name: Push to DockerHub
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/386
tags: kosmorro/kosmorro:latest
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

+ 27
- 0
Dockerfile Bestand weergeven

@@ -0,0 +1,27 @@
FROM python:3.9-slim

RUN useradd --create-home --shell /bin/bash kosmorro

WORKDIR /home/kosmorro

ENV PATH="/home/kosmorro:${PATH}"

RUN python -m pip install --upgrade pip

RUN pip install pipenv

COPY Pipfile.lock .

RUN pipenv sync && pipenv run pip freeze > requirements.txt

RUN pip uninstall pipenv -y

RUN pip install -r requirements.txt

COPY kosmorrolib/ kosmorrolib/

COPY kosmorro .

USER kosmorro

CMD ["bash"]

+ 9
- 0
README.md Bestand weergeven

@@ -32,6 +32,15 @@ Now, you can install Kosmorro with your PIP: `pip3 install kosmorro`.

Kosmorro being at an early-stage development, Windows is not supported officially for now.

#### Docker

Get the official Kosmorro Docker image by running `docker pull kosmorro/kosmorro`.

Now that you have the image, you can run it with `docker run -it kosmorro`.
Run Kosmorro by executing `kosmorro` in the container.

You can also run the image with the command: `docker run kosmorro kosmorro [args]`.

### Development environment

Before you run Kosmorro in your development environment, check you have installed these programs on your system:


Laden…
Annuleren
Opslaan