Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
v0ctor committed Jan 10, 2024
1 parent 87af8b4 commit 6912321
Show file tree
Hide file tree
Showing 11 changed files with 7,733 additions and 1,994 deletions.
20 changes: 13 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GO_VERSION=1.21.5-alpine3.18
ARG GO_VERSION=1.21.6-bookworm
ARG GOIMPORTS_VERSION=0.16.1
ARG DELVE_VERSION=1.22.0

Expand All @@ -17,22 +17,28 @@ FROM base AS development
ARG GOIMPORTS_VERSION
ARG DELVE_VERSION

RUN apk add \
bash \
RUN apt update \
&& apt install -y \
curl \
git \
jq \
python3 \
python3-pip \
zsh \
&& apt clean \
&& pip install --break-system-packages \
pyyaml \
&& go install golang.org/x/tools/cmd/goimports@v${GOIMPORTS_VERSION} \
&& go install github.com/go-delve/delve/cmd/dlv@v${DELVE_VERSION}

ARG USER_ID=1000
ENV USER_NAME=default

ENV PROMPT="%B%F{cyan}%n%f@%m:%F{yellow}%~%f %F{%(?.green.red[%?] )}>%f %b"

RUN adduser -D -u $USER_ID ${USER_NAME} \
&& chown -R ${USER_NAME}: /go/pkg
RUN useradd --user-group --create-home --uid ${USER_ID} ${USER_NAME} \
&& chown -R ${USER_NAME}: /go

USER ${USER_NAME}

ENV PROMPT="%B%F{cyan}%n%f@%m:%F{yellow}%~%f %F{%(?.green.red[%?] )}>%f %b"

RUN touch /home/${USER_NAME}/.zshrc
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ shell:
build:
$(EXEC) ./scripts/set-versions.sh $(NETBOX_VERSION) $(NETBOX_DOCKER_VERSION)
./scripts/fetch-spec.sh $$(cat api/netbox_version) $$(cat api/netbox_docker_version)
$(EXEC) ./scripts/fix-spec.sh
$(EXEC) ./scripts/fix-spec.py
./scripts/generate-code.sh
$(EXEC) go mod tidy
$(EXEC) goimports -w .
Expand Down
Loading

0 comments on commit 6912321

Please sign in to comment.