CoolFace
Apppublic

cutegui/fav

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
Dockerfile57 linesDownload Raw Back to root
1# Adapted from2# https://cloud.google.com/run/docs/quickstarts/build-and-deploy#containerizing3 4# Use the official Golang image to create a build artifact.5# https://hub.docker.com/_/golang6FROM golang:1.23 as builder7 8LABEL org.opencontainers.image.source="https://github.com/mat/besticon"9LABEL org.opencontainers.image.licenses="MIT"10 11# Copy local code to the container image.12WORKDIR /app13COPY . .14 15# TARGETARCH is set only by the docker buildx command - or manually16ARG TARGETARCH17 18# Build the command inside the container.19# (You may fetch or manage dependencies here,20# either manually or with a tool like "godep".)21RUN make build_linux_${TARGETARCH}22 23# Use a Docker multi-stage build to create a lean production image.24# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds25FROM alpine:3.2026 27 28# Have to define TARGETARCH again for the second stage29ARG TARGETARCH30 31# Copy the binary to the production image from the builder stage.32COPY --from=builder /app/bin/linux_${TARGETARCH}/iconserver /iconserver33 34ENV ADDRESS=''35ENV CACHE_SIZE_MB=3236ENV CORS_ENABLED=false37ENV CORS_ALLOWED_HEADERS=''38ENV CORS_ALLOWED_METHODS=''39ENV CORS_ALLOWED_ORIGINS=''40ENV CORS_ALLOW_CREDENTIALS=''41ENV CORS_DEBUG=''42ENV HOST_ONLY_DOMAINS=*43ENV HTTP_CLIENT_TIMEOUT=5s44ENV HTTP_MAX_AGE_DURATION=720h45ENV HTTP_USER_AGENT=''46ENV POPULAR_SITES=bing.com,github.com,instagram.com,reddit.com47ENV PORT=808048ENV SERVER_MODE=redirect49 50ARG VERSION=''51ARG REVISION=''52 53LABEL org.opencontainers.image.version="${VERSION}"54LABEL org.opencontainers.image.revision="${REVISION}"55 56# Run the web service on container startup.57CMD ["/iconserver"]