forked from fyne-io/fyne-cross
/
Dockerfile
42 lines (34 loc) · 1.07 KB
/
Dockerfile
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
ARG GO_VERSION=1.16.0
# fyne stable branch
ARG FYNE_VERSION=v2.0.1
FROM golang:${GO_VERSION}-buster AS tools
ARG FYNE_VERSION
WORKDIR /app
COPY . .
# Install the fyne CLI tool
RUN go get -ldflags="-w -s" -v "fyne.io/fyne/v2/cmd/fyne@${FYNE_VERSION}"
# Build the gowindres CLI tool
RUN go build -o /go/bin/gowindres -ldflags="-w -s" ./internal/cmd/gowindres
# Build the fyne-cross base image
FROM golang:${GO_VERSION}-buster AS base
COPY --from=tools /go/bin/fyne /usr/local/bin
COPY --from=tools /go/bin/gowindres /usr/local/bin
RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
gosu \
zip \
unzip \
# fyne deps
libgl1-mesa-dev \
libegl1-mesa-dev \
libgles2-mesa-dev \
xorg-dev \
# headers needed by xorg-dev
x11proto-dev \
# deps to support wayland
libxkbcommon-dev \
&& apt-get -qy autoremove \
&& apt-get clean \
&& rm -r /var/lib/apt/lists/*;
COPY ./docker/base/docker-entrypoint.sh /usr/local/bin
ENTRYPOINT [ "/usr/local/bin/docker-entrypoint.sh"]