Add working Dockerfile and fix plan to reflect Tampio's Python roots
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
|||||||
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
|
# Avoid interactive prompts during apt installs
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# libvoikko: the Finnish morphology library Tampio depends on
|
||||||
|
# voikko-fi: the actual Finnish dictionary data
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
libvoikko-dev \
|
||||||
|
voikko-fi \
|
||||||
|
python3 \
|
||||||
|
python3-libvoikko \
|
||||||
|
git \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install Tampio directly from source (not on PyPI or npm)
|
||||||
|
RUN git clone https://github.com/fergusq/tampio.git /opt/tampio
|
||||||
|
|
||||||
|
# Handy wrapper so you can just call `tampio` from anywhere
|
||||||
|
RUN echo '#!/bin/sh\npython3 /opt/tampio/tampio.py "$@"' > /usr/local/bin/tampio \
|
||||||
|
&& chmod +x /usr/local/bin/tampio
|
||||||
|
|
||||||
|
WORKDIR /tampiorama
|
||||||
|
|
||||||
|
CMD ["/bin/bash"]
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# Tampiorama — Project Plan
|
# Tampiorama — Project Plan
|
||||||
|
|
||||||
This is a project plan for project that's meaning is to be open source showcase for Tampio, the Finnish natural-language OOP language that compiles to JavaScript.
|
This is a project plan for open source showcase for Tampio, the Finnish natural-language OOP language. Tampio is a Python-based compiler that takes Finnish-syntax source files and compiles them to JavaScript.
|
||||||
|
|
||||||
## Project Goals
|
## Project Goals
|
||||||
|
|
||||||
@@ -23,15 +23,17 @@ tampiorama/
|
|||||||
├── basics/ ← factorial, fibonacci, hello world
|
├── basics/ ← factorial, fibonacci, hello world
|
||||||
├── data-structures/ ← lists, maps
|
├── data-structures/ ← lists, maps
|
||||||
├── strings/
|
├── strings/
|
||||||
├── async/ ← Promise/async usage
|
├── async/ ← async/Promise in the compiled JS output
|
||||||
└── program/ ← small "real" program
|
└── program/ ← small "real" program
|
||||||
```
|
```
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
- Base image: Debian or Ubuntu (libvoikko available via apt)
|
- Base image: Ubuntu 24.04
|
||||||
- Installs: `libvoikko-dev`, Node.js, `tampio` (npm)
|
- Installs: `libvoikko-dev`, `voikko-fi`, Python 3, `python3-libvoikko`, clones tampio from GitHub
|
||||||
- Goal: `docker run` gives a working Tampio environment with no manual setup
|
- Note: Tampio is not on PyPI or npm — installed directly from source
|
||||||
|
- A `/usr/local/bin/tampio` wrapper makes it callable as a plain command
|
||||||
|
- Goal: `docker compose run --rm tampio` gives a working shell with no manual setup
|
||||||
|
|
||||||
## Open Questions
|
## Open Questions
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
services:
|
||||||
|
tampio:
|
||||||
|
build: .
|
||||||
|
volumes:
|
||||||
|
- .:/tampiorama
|
||||||
|
working_dir: /tampiorama
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
Reference in New Issue
Block a user