FROM ubuntu:latest RUN useradd -u 5000 app WORKDIR /app USER root RUN apt-get update && apt-get install -y make wget git && apt-get install -y build-essential RUN wget https://golang.org/dl/go1.19.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz RUN mkdir -p /home/app/.cache/go-build && chown -R app:app /home/app ENV PATH $PATH:/usr/local/go/bin USER app