fix: image for amd64, will add more architectures in the future

This commit is contained in:
pommee
2025-02-09 15:00:44 +01:00
parent 0843d1778d
commit cbea7f83da
2 changed files with 18 additions and 7 deletions

View File

@@ -1,14 +1,26 @@
FROM alpine:3.18
FROM ubuntu:22.04
ARG DNS_PORT=53
ARG WEBSITE_PORT=8080
ENV DNS_PORT=${DNS_PORT}
ENV WEBSITE_PORT=${WEBSITE_PORT}
RUN apt-get update && \
apt-get install -y curl passwd && \
adduser --disabled-password --gecos "" appuser
WORKDIR /app
RUN apk add curl && \
curl https://raw.githubusercontent.com/pommee/goaway/main/installer.sh | sh /dev/stdin && \
mv /root/.local/bin/ /app/goaway
RUN chown appuser:appuser /app
RUN curl https://raw.githubusercontent.com/pommee/goaway/main/installer.sh | sh /dev/stdin && \
mv /root/.local/bin/goaway /app/goaway && \
chmod +x /app/goaway && \
chown appuser:appuser /app/goaway
EXPOSE ${DNS_PORT}/tcp ${DNS_PORT}/udp ${WEBSITE_PORT}/tcp
CMD ["sh", "-c", "/app/goaway --dnsport=${DNS_PORT} --webserverport=${WEBSITE_PORT}"]
USER appuser
CMD ["sh", "-c", "/app/goaway", "--dnsport=${DNS_PORT}", "--webserverport=${WEBSITE_PORT}"]

View File

@@ -8,9 +8,8 @@ publish:
docker buildx create --name multiarch-builder --use
docker buildx build \
--platform linux/amd64,linux/arm64,linux/386 \
--platform linux/amd64 \
--tag pommee/goaway:${VERSION} \
--push \
.
docker buildx rm multiarch-builder