Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

271
Vistas
Download a git repository in Dockerfile

I use docker.com to build automatically whenever I puch a commit to my GitHub repository. (see https://docs.docker.com/docker-hub/builds/)

I would like to call luacheck on all files in the docker image and let it fail if there are warnings.

I added a Lua error on purpose and added these lines in my Dockerfile:

RUN useradd -d /gluon gluon
RUN cd /gluon
RUN git clone https://github.com/rubo77/gluon/ gluon
RUN cd gluon

USER gluon

VOLUME /gluon
WORKDIR /gluon

RUN git checkout docker 
RUN cp -a docs/site-example/ site
RUN luacheckrc .; if [ $? -gt 0 ]; then exit 1; fi

see: https://github.com/rubo77/gluon/commits/docker

But it fails

/bin/sh: 1: cd: can't cd to /gluon

even before the git repository

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You have to create the directory for the gluon user first and give it write-rights with:

FROM ubuntu
RUN useradd -d /gluon gluon
RUN apt-get update && apt-get install -y git
RUN mkdir /gluon
RUN chown -R gluon:gluon /gluon
USER gluon
RUN cd /gluon
RUN git clone https://github.com/rubo77/gluon/ gluon
RUN cd gluon

VOLUME /gluon
WORKDIR /gluon
RUN git checkout docker
RUN cp -a docs/site-example/ site
RUN luacheck .; if [ $? -gt 0 ]; then exit 1; fi
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda