-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.dev
More file actions
70 lines (59 loc) · 1.56 KB
/
Dockerfile.dev
File metadata and controls
70 lines (59 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Development Dockerfile with live reloading
FROM golang:1.24-bookworm
# Install required packages and Playwright dependencies (matching production)
RUN apt-get update && apt-get install -y \
git \
python3 \
python3-pip \
curl \
ca-certificates \
ffmpeg \
aria2 \
libnss3 \
libnspr4 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libdbus-1-3 \
libdrm2 \
libxkbcommon0 \
libxcomposite1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxrandr2 \
libgbm1 \
libpango-1.0-0 \
libcairo2 \
libasound2 \
libatspi2.0-0 \
libgtk-3-0 \
libxss1 \
fonts-liberation \
libappindicator3-1 \
lsb-release \
xdg-utils \
wget \
&& rm -rf /var/lib/apt/lists/*
# Install yt-dlp and itch-dl
RUN pip3 install --break-system-packages yt-dlp[default] itch-dl
# Set working directory
WORKDIR /app
# Install Air for live reloading (compatible with Go 1.22)
RUN go install github.com/air-verse/air@v1.52.3
# Install Playwright CLI that matches our library version
RUN go install github.com/playwright-community/playwright-go/cmd/playwright@v0.4501.1
ENV PATH="/root/go/bin:${PATH}"
# Copy go.mod and go.sum first for better Docker layer caching
COPY go.mod go.sum ./
RUN go mod download
# Install Playwright browsers (dependencies already installed above)
RUN playwright install chromium
# Verify installation
RUN playwright --version
# Create data directories
RUN mkdir -p /data /cache
# Copy Air config for live reloading
COPY .air.toml .
# Default command is to run Air
CMD ["air"]