-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdockerfile
More file actions
61 lines (48 loc) · 1.37 KB
/
Copy pathdockerfile
File metadata and controls
61 lines (48 loc) · 1.37 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
FROM golang:1.24-bullseye
WORKDIR /usr/src/app
# Install base build tools
RUN apt-get update && apt-get install -y --fix-missing \
build-essential \
unzip \
curl
# Install GTK and WebKit for AMD64
RUN apt-get install -y --fix-missing \
libgtk-3-dev \
libwebkit2gtk-4.0-dev
# Install additional dependencies for AMD64
RUN apt-get install -y --fix-missing \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libharfbuzz0b \
libatk1.0-0 \
libcairo2 \
libcairo-gobject2 \
libgdk-pixbuf-2.0-0 \
libsoup2.4-1 \
libglib2.0-0 \
libglib2.0-dev \
libjavascriptcoregtk-4.0-18
# Install X11 libraries
RUN apt-get install -y --fix-missing \
x11proto-dev \
libx11-dev \
libxrender-dev \
libxext-dev
# Clear cache
RUN rm -rf /var/lib/apt/lists/*
# Install required tooling
RUN go install github.com/wailsapp/wails/v2/cmd/wails@latest
RUN curl -fsSL https://bun.sh/install | bash
ENV BUN_INSTALL="/root/.bun"
ENV PATH="${BUN_INSTALL}/bin:${PATH}"
# Copy project files
COPY . .
# Install frontend dependencies
WORKDIR /usr/src/app/frontend
RUN bun install
WORKDIR /usr/src/app
# Build for Linux AMD64
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 wails build -platform linux/amd64
FROM scratch AS extract
COPY --from=0 /usr/src/app/build/bin/ /
# run this build it. docker build --target extract --output type=local,dest=./build/bin .