2019-03-01 02:32:44 +00:00
|
|
|
FROM ubuntu:latest
|
|
|
|
MAINTAINER Noah Petherbridge <root@kirsle.net>
|
|
|
|
ENV GOPATH /home/builder/go
|
|
|
|
|
2019-04-05 20:16:33 +00:00
|
|
|
# Update all the software and then install Go, git, SDL2 and other dependencies
|
|
|
|
RUN apt update && \
|
|
|
|
apt -y upgrade && \
|
|
|
|
apt -y install git zip golang libsdl2-dev libsdl2-ttf-dev make && \
|
2019-03-01 02:32:44 +00:00
|
|
|
apt clean
|
|
|
|
|
|
|
|
# Create a user to build the packages.
|
2019-04-05 20:16:33 +00:00
|
|
|
RUN useradd builder -u 1000 -m -G users
|
2019-03-01 02:32:44 +00:00
|
|
|
|
|
|
|
# Add the project to the GOPATH
|
|
|
|
ADD . /home/builder/go/src/git.kirsle.net/apps/doodle
|
2019-04-05 20:16:33 +00:00
|
|
|
WORKDIR /home/builder/go/src/git.kirsle.net/apps/doodle
|
2019-03-01 02:32:44 +00:00
|
|
|
RUN chown -R builder:builder /home/builder/go
|
|
|
|
|
2019-04-05 20:16:33 +00:00
|
|
|
# Build the app as the `builder` user
|
2019-03-01 02:32:44 +00:00
|
|
|
USER builder
|
|
|
|
RUN make setup
|
|
|
|
CMD ["make", "__docker.dist"]
|