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

fix packages for alpine #304

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix packages for alpine #304

wants to merge 1 commit into from

Conversation

hyberdk
Copy link

@hyberdk hyberdk commented Jul 8, 2021

you cannot build the docker image as there are missing some packages in Alpine. This fixes it.

Esben

@a-imran99
Copy link

@hyberdk
I have been trying to build this in local. I have also changed the line you have committed but another error comes in line no: 19 of dockerfile

&& mv ~/.TinyTeX /opt/TinyTeX \

mv: can't rename '/root/.TinyTeX': No such file or directory

I am using docker for windows.

@PaulWen
Copy link

PaulWen commented Feb 19, 2022

It looks like TinyTeX renamed their branch from master to main.

Once I updated the Dockerfile accordingly I was again able to build to docker container:

# build
FROM golang:1.14.7-alpine3.12 AS build
WORKDIR /go/src/${owner:-github.com/IzakMarais}/reporter
RUN apk update && apk add make git
ADD . .
RUN make build

# create image
FROM alpine:3.12
COPY util/texlive.profile /

RUN PACKAGES="wget perl-switch fontconfig fontconfig-dev" \
        && apk update \
        && apk add $PACKAGES \
        && apk add ca-certificates \
        && wget -qO- \
          "https://github.com/yihui/tinytex/raw/main/tools/install-unx.sh" | \
          sh -s - --admin --no-path \
        && mv ~/.TinyTeX /opt/TinyTeX \
        && /opt/TinyTeX/bin/*/tlmgr path add \
        && tlmgr path add \
        && chown -R root:adm /opt/TinyTeX \
        && chmod -R g+w /opt/TinyTeX \
        && chmod -R g+wx /opt/TinyTeX/bin \
        && tlmgr install epstopdf-pkg \
        # Cleanup
        && apk del --purge -qq $PACKAGES \
        && apk del --purge -qq \
        && rm -rf /var/lib/apt/lists/*


COPY --from=build /go/bin/grafana-reporter /usr/local/bin
ENTRYPOINT [ "/usr/local/bin/grafana-reporter" ]

@f-lambert
Copy link

f-lambert commented Jun 15, 2023

Hello,
I'm facing the same kind of issue when trying to generate the image even after applying the correction you propose, i'm getting
image

@hyberdk
Copy link
Author

hyberdk commented Jun 15, 2023

it looks like an issue with the mirror, its reporting back a 404 no found.. perhaps they stopped hosting the packages?

@f-lambert
Copy link

It's look like the mirror redirection on the wget of the install of latex keeps the begin of the url ==> https://mirrors.evoluso.com/CTAN/http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz should be https://mirrors.evoluso.com/CTAN/systems/texlive/tlnet/install-tl-unx.tar.gz, i've just test the second url manually and it's working but now the problem is to make it work with their script

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.

5 participants