Dan Anglin
042f3e2364
Changes: - Update the Dockerfile template to build the GTS image from alpine:3.17. - Add logic to download and verify GTS packages. - Allow the Download target to be more forgiving for a service that does not need to download any files. - The Download target is now a dependency to the Render target for all services that aren't named 'compose'. - Update the path to the web files in the GTS config file. - Update the entrypoint to use the correct path of the GTS executable file. Chores: - Remove unused DockerImageDigest setting from GTS config.
26 lines
1.1 KiB
Docker
26 lines
1.1 KiB
Docker
# syntax=docker/dockerfile:1
|
|
FROM alpine:3.17
|
|
|
|
WORKDIR /tmp
|
|
|
|
RUN --mount=type=bind,source=.,target=/packages \
|
|
apk update --no-cache && apk add bash --no-cache \
|
|
&& addgroup -S -g {{ .FlowGID }} flow \
|
|
&& adduser -S -H -D -s /bin/bash -u {{ .GoToSocial.LinuxUID }} -G flow gts \
|
|
&& mkdir -p /flow/gts/config \
|
|
&& tar xzvf /packages/gotosocial_{{ .GoToSocial.Version }}_linux_amd64.tar.gz \
|
|
&& tar xzvf /packages/gotosocial_{{ .GoToSocial.Version }}_web-assets.tar.gz \
|
|
&& mv /tmp/gotosocial /usr/local/bin/gotosocial \
|
|
&& mv /tmp/web /flow/gts \
|
|
&& chown -R {{ .GoToSocial.LinuxUID }}:{{ .FlowGID }} /flow/gts \
|
|
&& rm -rf /tmp/*
|
|
|
|
COPY --chown={{ .GoToSocial.LinuxUID }}:{{ .GoToSocial.LinuxUID }} entrypoint.sh /usr/local/bin/entrypoint
|
|
COPY --chown={{ .GoToSocial.LinuxUID }}:{{ .GoToSocial.LinuxUID }} config.yaml /flow/gts/config/config.yaml
|
|
COPY --chown={{ .GoToSocial.LinuxUID }}:{{ .FlowGID }} traefik_gotosocial.yaml /flow/gts/tmp/traefik_gotosocial.yaml
|
|
|
|
RUN chmod a+x /usr/local/bin/entrypoint
|
|
|
|
USER {{ .GoToSocial.LinuxUID }}:{{ .FlowGID }}
|
|
|
|
ENTRYPOINT ["entrypoint"]
|