Browse Source

feat: add official Docker image (#137)

tags/v0.10.0
Nic 3 years ago
committed by GitHub
parent
commit
a6d3575977
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 64 additions and 0 deletions
  1. +28
    -0
      .github/workflows/release.yml
  2. +27
    -0
      Dockerfile
  3. +9
    -0
      README.md

+ 28
- 0
.github/workflows/release.yml View File

@@ -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 View File

@@ -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 View File

@@ -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:


Loading…
Cancel
Save