You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Noticed that the docker image has to build from scratch each time. It would be nice to have a Dockerfile that uses a prebuilt image of resume.dockerfile so it just quickly works.
Built and pushed this image using these instructions.
FROM drianthoderyme/pandoc-resume
# prepare a user which runs everything locally! - required in child images!
RUN useradd --user-group --create-home --shell /bin/false app
ENV HOME=/home/app
WORKDIR $HOME
ENV APP_NAME=resume
# before switching to user we need to set permission properly
# copy all files, except the ignored files from .dockerignore
COPY . $HOME/$APP_NAME/
COPY ./Makefile $HOME/$APP_NAME/
RUN chown -R app:app $HOME/*
USER app
WORKDIR $HOME/$APP_NAME
RUN make
and then update the docker-compose.yml to use the new Dockerfile
dockerfile: ./.docker/Dockerfile
Finally, run docker-compose up -d to build the files correctly.
I'd put in a PR but I think the Docker image should be from the repo owner so it's more official but feel free to use mine.
The text was updated successfully, but these errors were encountered:
The docker image requires context to be installed and that takes about 10 minutes. I was trying to run the docker image within a gitlab runner which caused each run to take around 10 minutes. By building the container with context preinstalled and pushing it up to dockerhub and then reusing that image using a new Dockerfile, I was able to save 9 minutes on each run.
Locally running this, you'd only have to build the container once before you could keep reusing it. With a prebuilt container with context inside, no one would have to wait 10 minutes to run the app.
OK, thanks for the context. I wonder if we could have a single docker file the builds either from the base image, or from scratch, depending on a parameter.
I'll look into it, and if it's not possible I'll implement it your way.
Noticed that the docker image has to build from scratch each time. It would be nice to have a
Dockerfile
that uses a prebuilt image ofresume.dockerfile
so it just quickly works.Built and pushed this image using these instructions.
https://hub.docker.com/r/drianthoderyme/pandoc-resume
then you can add a
Dockerfile
with thisand then update the
docker-compose.yml
to use the newDockerfile
Finally, run
docker-compose up -d
to build the files correctly.I'd put in a PR but I think the Docker image should be from the repo owner so it's more official but feel free to use mine.
The text was updated successfully, but these errors were encountered: