Update the Dockerfiles
This commit is contained in:
parent
9638b67a4e
commit
f3e1fdd217
|
@ -10,13 +10,14 @@
|
||||||
FROM i386/debian:latest
|
FROM i386/debian:latest
|
||||||
ENV GOPATH /go
|
ENV GOPATH /go
|
||||||
ENV GOPROXY direct
|
ENV GOPROXY direct
|
||||||
ENV PATH /opt/go/bin:/bin:/sbin:/usr/bin:/usr/sbin:/go/bin
|
ENV PATH /opt/go/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/go/bin
|
||||||
|
|
||||||
# Debian: Update all software and get dependencies.
|
# Debian: Update all software and get dependencies.
|
||||||
# RUN dnf -y update
|
# RUN dnf -y update
|
||||||
RUN apt update && apt -y upgrade && apt -y dist-upgrade
|
RUN apt update && apt -y upgrade && apt -y dist-upgrade
|
||||||
RUN apt -y install git zip tar libsdl2-dev libsdl2-ttf-dev \
|
RUN apt -y install git zip tar libsdl2-dev libsdl2-ttf-dev \
|
||||||
libsdl2-mixer-dev gcc-mingw-w64-i686 gcc make wget
|
libsdl2-mixer-dev gcc-mingw-w64-i686 gcc make wget \
|
||||||
|
flatpak-builder ruby-dev gcc rpm libffi-dev
|
||||||
|
|
||||||
# Create a user to build the packages.
|
# Create a user to build the packages.
|
||||||
RUN useradd builder -u 1000 -m -G users && \
|
RUN useradd builder -u 1000 -m -G users && \
|
||||||
|
@ -69,7 +70,7 @@ RUN cp -r /git/vendor/fonts ./assets/fonts && \
|
||||||
mkdir rtp && cp -r /git/rtp/* rtp/
|
mkdir rtp && cp -r /git/rtp/* rtp/
|
||||||
|
|
||||||
RUN ls -hal && pwd
|
RUN ls -hal && pwd
|
||||||
RUN mkdir -p bin && cp /git/vendor/DLL/*.dll bin/
|
RUN mkdir -p bin && cp /git/vendor/DLL-32bit/*.dll bin/
|
||||||
|
|
||||||
# Package rpm and deb for Linux.
|
# Package rpm and deb for Linux.
|
||||||
# TODO: fpm doesn't like to install in Docker right now
|
# TODO: fpm doesn't like to install in Docker right now
|
||||||
|
@ -86,4 +87,6 @@ RUN gem install fpm; exit 0
|
||||||
# zip them all up nicely.
|
# zip them all up nicely.
|
||||||
RUN make mingw32-release
|
RUN make mingw32-release
|
||||||
|
|
||||||
CMD ["cp", "-r", "-v", "/go/src/git.kirsle.net/apps/doodle/dist/", "/mnt/export/"]
|
CMD ["cp", "-r", "-v", \
|
||||||
|
"/go/src/git.kirsle.net/apps/doodle/dist/release/", \
|
||||||
|
"/mnt/export/"]
|
||||||
|
|
|
@ -8,15 +8,15 @@
|
||||||
##
|
##
|
||||||
|
|
||||||
FROM fedora:latest
|
FROM fedora:latest
|
||||||
MAINTAINER Noah Petherbridge <root@kirsle.net>
|
|
||||||
ENV GOPATH /go
|
ENV GOPATH /go
|
||||||
ENV GOPROXY direct
|
ENV GOPROXY direct
|
||||||
ENV PATH /bin:/sbin:/usr/bin:/usr/sbin:/go/bin
|
ENV PATH /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/go/bin
|
||||||
|
|
||||||
# Fedora: Update all software and get dependencies.
|
# Fedora: Update all software and get dependencies.
|
||||||
# RUN dnf -y update
|
# RUN dnf -y update
|
||||||
RUN dnf -y install git zip tar golang SDL2-devel SDL2_ttf-devel \
|
RUN dnf -y install git zip tar golang SDL2-devel SDL2_ttf-devel \
|
||||||
SDL2_mixer-devel mingw64-gcc make wget
|
SDL2_mixer-devel mingw64-gcc make wget \
|
||||||
|
flatpak-builder ruby-devel gcc rpm-build libffi-devel
|
||||||
|
|
||||||
# Create a user to build the packages.
|
# Create a user to build the packages.
|
||||||
RUN useradd builder -u 1000 -m -G users && \
|
RUN useradd builder -u 1000 -m -G users && \
|
||||||
|
@ -67,7 +67,7 @@ RUN mkdir -p bin && cp /git/vendor/DLL/*.dll bin/
|
||||||
|
|
||||||
# Package rpm and deb for Linux.
|
# Package rpm and deb for Linux.
|
||||||
# TODO: fpm doesn't like to install in Docker right now
|
# TODO: fpm doesn't like to install in Docker right now
|
||||||
RUN dnf -y install ruby-devel gcc rpm-build libffi-devel
|
# RUN dnf -y install ruby-devel gcc rpm-build libffi-devel
|
||||||
RUN gem install fpm; exit 0
|
RUN gem install fpm; exit 0
|
||||||
|
|
||||||
# Run the big mingw-release, which:
|
# Run the big mingw-release, which:
|
||||||
|
@ -80,4 +80,24 @@ RUN gem install fpm; exit 0
|
||||||
# zip them all up nicely.
|
# zip them all up nicely.
|
||||||
RUN make mingw-release
|
RUN make mingw-release
|
||||||
|
|
||||||
CMD ["sudo", "cp", "-r", "-v", "/go/src/git.kirsle.net/apps/doodle/dist/", "/mnt/export/"]
|
###
|
||||||
|
# Build the Flatpak release for Linux.
|
||||||
|
# RUN git clone https://code.sketchymaze.com/game/flatpak /git/flatpak
|
||||||
|
|
||||||
|
# # Fetch flatpak dependencies.
|
||||||
|
# RUN flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo && \
|
||||||
|
# flatpak install -y org.freedesktop.Sdk//21.08 && \
|
||||||
|
# flatpak install -y org.freedesktop.Sdk.Extension.golang//21.08
|
||||||
|
|
||||||
|
# # Path the go.mod `replace` directives to Flatpak's sandbox paths,
|
||||||
|
# # then build the Flatpak.
|
||||||
|
# RUN sed -i 's/=> \/git\/go\//=> \/run\/build\/sketchymaze\/deps\//g' go.mod && \
|
||||||
|
# cat go.mod
|
||||||
|
# WORKDIR /git/flatpak
|
||||||
|
# RUN make bundle; exit 0
|
||||||
|
# WORKDIR /go/src/git.kirsle.net/apps/doodle
|
||||||
|
|
||||||
|
CMD ["sudo", "cp", "-r", "-v", \
|
||||||
|
"/go/src/git.kirsle.net/apps/doodle/dist/release/", \
|
||||||
|
# "/git/flatpak/*.flatpak", \
|
||||||
|
"/mnt/export/"]
|
||||||
|
|
1
Makefile
1
Makefile
|
@ -3,6 +3,7 @@ SHELL := /bin/bash
|
||||||
# NOTE:
|
# NOTE:
|
||||||
# Fedora likes `podman` instead of `docker` but most other
|
# Fedora likes `podman` instead of `docker` but most other
|
||||||
# distros (Debian, Manjaro) `docker` is easier to use.
|
# distros (Debian, Manjaro) `docker` is easier to use.
|
||||||
|
# ln -s /usr/bin/podman ~/bin/docker
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
|
10
README.md
10
README.md
|
@ -10,6 +10,16 @@ and the makefile ought to "just work" (provided all the git repositories are
|
||||||
up and the heads are not broken). Also reading the Dockerfile can give you
|
up and the heads are not broken). Also reading the Dockerfile can give you
|
||||||
an idea of the end-to-end process of the build.
|
an idea of the end-to-end process of the build.
|
||||||
|
|
||||||
|
Run `make setup` to add flathub (--if-not-exists) and download the dependency
|
||||||
|
layers.
|
||||||
|
|
||||||
```
|
```
|
||||||
make mingw
|
make mingw
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Podman tip: `podman system reset` to nuke all of it, cached images and build
|
||||||
|
steps, for a fresh start when testing the dockerfiles.
|
||||||
|
|
||||||
|
**Fedora tip:** run `setenforce permissive` to disable SELinux for the
|
||||||
|
bind mount, or podman/docker can't copy artifacts from the Docker
|
||||||
|
container up to the host.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user