Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add base image for alpine and golang #53

Closed
wants to merge 2 commits into from

Conversation

9edang
Copy link

@9edang 9edang commented Jul 24, 2024

  • add base alpine docker image
  • add golang alpine docker image

@chdanielmueller
Copy link
Member

Hi @9edang

There already is a base alpine image.
It is called surnet/alpine-wkhtmltopdf.
Your requested versions are also already available: 3.20.1-0.12.6-full and 3.20.1-0.12.6-small

If you need a golang image you can do it like that:

FROM surnet/alpine-wkhtmltopdf:3.20.1-0.12.6-full as wkhtmltopdf
FROM golang:1.22.5-alpine3.20

# Install dependencies for wkhtmltopdf
RUN apk add --no-cache \
    libstdc++ \
    libx11 \
    libxrender \
    libxext \
    libssl3 \
    ca-certificates \
    fontconfig \
    freetype \
    ttf-dejavu \
    ttf-droid \
    ttf-freefont \
    ttf-liberation \
    # more fonts
  && apk add --no-cache --virtual .build-deps \
    msttcorefonts-installer \
  # Install microsoft fonts
  && update-ms-fonts \
  && fc-cache -f \
  # Clean up when done
  && rm -rf /tmp/* \
  && apk del .build-deps

# Copy wkhtmltopdf files from docker-wkhtmltopdf image
COPY --from=wkhtmltopdf /bin/wkhtmltopdf /bin/wkhtmltopdf
# COPY --from=wkhtmltopdf /bin/wkhtmltoimage /bin/wkhtmltoimage
# COPY --from=wkhtmltopdf /lib/libwkhtmltox* /lib/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants