Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: add official Docker image (#137)
  • Loading branch information
nicfb committed Feb 13, 2021
1 parent 86983c9 commit a6d3575
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Expand Up @@ -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 changes: 27 additions & 0 deletions Dockerfile
@@ -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 changes: 9 additions & 0 deletions README.md
Expand Up @@ -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:
Expand Down

0 comments on commit a6d3575

Please sign in to comment.