Skip to content

Commit a6d3575

Browse files
author
Nic
authored
feat: add official Docker image (#137)
1 parent 86983c9 commit a6d3575

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,31 @@ jobs:
8181
run: |
8282
make POEDITOR_API_ACCESS="${POEDITOR_API_ACCESS}" POEDITOR_PROJECT_ID="306433" build
8383
twine upload dist/*
84+
docker:
85+
name: Push to DockerHub
86+
runs-on: ubuntu-latest
87+
steps:
88+
-
89+
name: Set up QEMU
90+
uses: docker/setup-qemu-action@v1
91+
-
92+
name: Set up Docker Buildx
93+
uses: docker/setup-buildx-action@v1
94+
-
95+
name: Login to DockerHub
96+
uses: docker/login-action@v1
97+
with:
98+
username: ${{ secrets.DOCKERHUB_USERNAME }}
99+
password: ${{ secrets.DOCKERHUB_TOKEN }}
100+
-
101+
name: Build and push
102+
id: docker_build
103+
uses: docker/build-push-action@v2
104+
with:
105+
push: true
106+
file: ./Dockerfile
107+
platforms: linux/amd64,linux/arm64,linux/386
108+
tags: kosmorro/kosmorro:latest
109+
-
110+
name: Image digest
111+
run: echo ${{ steps.docker_build.outputs.digest }}

Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM python:3.9-slim
2+
3+
RUN useradd --create-home --shell /bin/bash kosmorro
4+
5+
WORKDIR /home/kosmorro
6+
7+
ENV PATH="/home/kosmorro:${PATH}"
8+
9+
RUN python -m pip install --upgrade pip
10+
11+
RUN pip install pipenv
12+
13+
COPY Pipfile.lock .
14+
15+
RUN pipenv sync && pipenv run pip freeze > requirements.txt
16+
17+
RUN pip uninstall pipenv -y
18+
19+
RUN pip install -r requirements.txt
20+
21+
COPY kosmorrolib/ kosmorrolib/
22+
23+
COPY kosmorro .
24+
25+
USER kosmorro
26+
27+
CMD ["bash"]

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ Now, you can install Kosmorro with your PIP: `pip3 install kosmorro`.
3232

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

35+
#### Docker
36+
37+
Get the official Kosmorro Docker image by running `docker pull kosmorro/kosmorro`.
38+
39+
Now that you have the image, you can run it with `docker run -it kosmorro`.
40+
Run Kosmorro by executing `kosmorro` in the container.
41+
42+
You can also run the image with the command: `docker run kosmorro kosmorro [args]`.
43+
3544
### Development environment
3645

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

0 commit comments

Comments
 (0)