Use nixos for dev image

This commit is contained in:
Jan Bader 2023-09-24 00:33:39 +02:00
parent 5d57045efb
commit 98e1fbb071

View File

@ -1,16 +1,9 @@
FROM ubuntu as godeps
RUN apt update && apt install -y golang && apt dist-upgrade -y
RUN go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
RUN go install github.com/go-task/task/v3/cmd/task@latest
RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
FROM ubuntu
RUN apt update && apt install -y golang nodejs yarn bash curl git && apt dist-upgrade -y
FROM nixos/nix
ENV PATH="/root/.yarn/bin/:${PATH}"
WORKDIR /src/web
RUN nix-env --install go go-task sqlc nodejs yarn
ADD web/package.json web/yarn.lock /src/web/
WORKDIR /src/web
RUN yarn
WORKDIR /src
VOLUME /go
VOLUME /.cache
RUN yarn
COPY --from=godeps /root/go/bin/task /root/go/bin/sqlc /root/go/bin/golangci-lint /usr/local/bin/