| @@ -81,3 +81,31 @@ jobs: | |||||
| run: | | run: | | ||||
| make POEDITOR_API_ACCESS="${POEDITOR_API_ACCESS}" POEDITOR_PROJECT_ID="306433" build | make POEDITOR_API_ACCESS="${POEDITOR_API_ACCESS}" POEDITOR_PROJECT_ID="306433" build | ||||
| twine upload dist/* | 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 }} | |||||
| @@ -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"] | |||||
| @@ -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. | 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 | ### Development environment | ||||
| Before you run Kosmorro in your development environment, check you have installed these programs on your system: | Before you run Kosmorro in your development environment, check you have installed these programs on your system: | ||||