Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinned golang and node to older versions in Dockerfile #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
FROM golang:alpine
FROM node:14-alpine as node-build
COPY ./webapp/ /src/webapp
WORKDIR /src/webapp
RUN npm ci && \
npm run build

FROM golang:1.18-alpine as go-build
WORKDIR /src
RUN apk add --update npm git
RUN go get -u github.com/jteeuwen/go-bindata/...
COPY ./webapp/package.json webapp/package.json
RUN cd ./webapp && \
npm install

COPY . .
RUN cd ./webapp && \
npm run build
COPY --from=node-build /src/webapp/build /src/webapp/build

RUN go install github.com/go-bindata/go-bindata/...
RUN cd ./migrations && \
go-bindata -pkg migrations .
RUN go-bindata -pkg tmpl -o ./tmpl/bindata.go ./tmpl/ && \
go-bindata -pkg webapp -o ./webapp/bindata.go ./webapp/build/...

RUN go build -o /opt/featmap/featmap && \
chmod 775 /opt/featmap/featmap
RUN go build -o ./build/featmap && \
chmod 755 ./build/featmap

ENTRYPOINT cd /opt/featmap && ./featmap
FROM alpine
COPY --from=go-build /src/build/featmap /opt/featmap/featmap
WORKDIR /opt/featmap
CMD /opt/featmap/featmap
25 changes: 19 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,30 @@ module github.com/amborle/featmap
go 1.15

require (
github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef
github.com/apache/arrow/go/arrow v0.0.0-20200601151325-b2287a20f230 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
github.com/cockroachdb/cockroach-go v0.0.0-20190925194419-606b3d062051 // indirect
github.com/containerd/containerd v1.3.3 // indirect
github.com/denisenkom/go-mssqldb v0.0.0-20200620013148-b91950f658ec // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/elazarl/go-bindata-assetfs v1.0.1
github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect
github.com/go-chi/chi v4.1.2+incompatible
github.com/go-chi/cors v1.1.1
github.com/go-chi/cors v1.2.1
github.com/go-chi/jwtauth v4.0.4+incompatible
github.com/go-chi/render v1.0.1
github.com/golang-migrate/migrate/v4 v4.13.0
github.com/jmoiron/sqlx v1.2.0
github.com/go-chi/render v1.0.3
github.com/golang-migrate/migrate/v4 v4.16.2
github.com/google/go-github v17.0.0+incompatible // indirect
github.com/gorilla/context v1.1.1 // indirect
github.com/jmoiron/sqlx v1.3.5
github.com/jteeuwen/go-bindata v3.0.7+incompatible // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/pkg/errors v0.9.1
github.com/satori/go.uuid v1.2.0
github.com/snowflakedb/glog v0.0.0-20180824191149-f5055e6f21ce // indirect
github.com/stripe/stripe-go v70.15.0+incompatible
golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect
github.com/xdg/stringprep v1.0.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
golang.org/x/crypto v0.14.0
)
Loading