git.sr.ht/~pingoo/stdx@v0.0.0-20240218134121-094174641f6e/.devcontainer/Dockerfile (about) 1 FROM golang:1.22 AS go 2 3 FROM debian:12 4 5 RUN apt update && apt upgrade -y 6 RUN apt install -y git ca-certificates make vim \ 7 bash gcc g++ zsh curl wget zip coreutils sqlite3 python3 dnsutils 8 9 RUN update-ca-certificates 10 11 # TODO: set up timezone: UTC 12 13 # Setup dev user 14 ARG USERNAME=dev 15 ARG USER_UID=10001 16 ARG USER_GID=$USER_UID 17 18 RUN addgroup --gid $USER_GID $USERNAME \ 19 && adduser --uid $USER_UID --ingroup $USERNAME --disabled-password --shell /bin/bash --gecos "" $USERNAME 20 21 USER $USERNAME 22 23 COPY bashrc /home/$USERNAME/.bashrc 24 COPY vimrc /home/$USERNAME/.vimrc 25 26 # Setup go 27 RUN mkdir -p /home/$USERNAME/.local/gopath 28 29 COPY --from=go /usr/local/go /home/$USERNAME/.local/go 30 31 ENV GOROOT /home/$USERNAME/.local/go 32 ENV GOPATH /home/$USERNAME/.local/gopath 33 ENV PATH $PATH:$GOPATH/bin:$GOROOT/bin 34 35 WORKDIR / 36 37 # USER root 38 39 EXPOSE 8000