-
Notifications
You must be signed in to change notification settings - Fork 3
Multi-image architecture and Go 1.25 upgrade #170
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
66fd7cc
Upgrade to go 1.25
pricem14pc 0841993
Build image for corporate Mac arm64
pricem14pc f1b9c3b
Just be explicit !
pricem14pc 9117135
Add dummy cacert to get build working
pricem14pc c0fdd65
auto patch increment
ras-rm-pr-bot e64564a
multi image build
pricem14pc b09a4b0
multi image build
pricem14pc 9a130ab
multi image build
pricem14pc f0f2dfe
multi image build
pricem14pc 3d3701c
multi image build
pricem14pc 1e1e464
Typo
pricem14pc 6d63705
multi image build
pricem14pc 2d0ab2d
multi image build
pricem14pc 4027250
Fix
pricem14pc eb9c685
Fix
pricem14pc 0e94eab
Fix
pricem14pc d0d9b09
removing out of date docker compose for integration tests
arroyoAle 7511414
Remove deprecated link from compose file
pricem14pc 69d715f
Typo
pricem14pc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,27 @@ | ||
| FROM golang:1.19.3-alpine3.16 | ||
|
|
||
| EXPOSE 8080 | ||
| FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS build-stage | ||
|
|
||
| RUN mkdir "/src" | ||
| WORKDIR "/src" | ||
|
|
||
| COPY . . | ||
|
|
||
| COPY build/linux-amd64/bin/main /usr/local/bin/ | ||
| RUN go build -v -o main | ||
| RUN chmod 755 main | ||
|
|
||
| FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS final-stage | ||
|
|
||
| RUN addgroup -S survey-group && adduser -S survey-user -G survey-group | ||
| RUN mkdir -p "/opt/survey" | ||
| RUN chown survey-user:survey-group /opt/survey | ||
|
|
||
| WORKDIR "/opt/survey" | ||
| COPY --from=build-stage /src/main . | ||
| COPY --from=build-stage /src/db-migrations /db-migrations | ||
pricem14pc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| COPY db-migrations /db-migrations | ||
| RUN chmod 550 /opt/survey/main | ||
| RUN chown survey-user:survey-group /opt/survey/main | ||
| RUN chown survey-user:survey-group /db-migrations | ||
|
|
||
| RUN go build | ||
| RUN ls | ||
| USER survey-user | ||
|
|
||
| CMD "./rm-survey-service" | ||
| CMD "./main" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,39 +1,51 @@ | ||
| module github.com/ONSdigital/rm-survey-service | ||
|
|
||
| go 1.24 | ||
| go 1.25 | ||
|
|
||
| require ( | ||
| github.com/DATA-DOG/go-sqlmock v1.5.0 | ||
| github.com/DATA-DOG/go-sqlmock v1.5.2 | ||
| github.com/blendle/zapdriver v1.3.1 | ||
| github.com/gofrs/uuid v4.2.0+incompatible | ||
| github.com/golang-migrate/migrate/v4 v4.15.2 | ||
| github.com/gorilla/handlers v1.5.1 | ||
| github.com/gorilla/mux v1.8.0 | ||
| github.com/lib/pq v1.10.6 | ||
| github.com/gofrs/uuid v4.4.0+incompatible | ||
| github.com/golang-migrate/migrate/v4 v4.19.0 | ||
| github.com/gorilla/handlers v1.5.2 | ||
| github.com/gorilla/mux v1.8.1 | ||
| github.com/lib/pq v1.10.9 | ||
| github.com/pkg/errors v0.9.1 | ||
| github.com/smartystreets/goconvey v1.7.2 | ||
| go.uber.org/zap v1.21.0 | ||
| github.com/smartystreets/goconvey v1.8.1 | ||
| go.uber.org/zap v1.27.0 | ||
| gopkg.in/go-playground/validator.v9 v9.31.0 | ||
| ) | ||
|
|
||
| require ( | ||
| github.com/felixge/httpsnoop v1.0.3 // indirect | ||
| github.com/go-playground/locales v0.14.0 // indirect | ||
| github.com/go-playground/universal-translator v0.18.0 // indirect | ||
| github.com/golang/protobuf v1.5.3 // indirect | ||
| github.com/felixge/httpsnoop v1.0.4 // indirect | ||
| github.com/go-playground/locales v0.14.1 // indirect | ||
| github.com/go-playground/universal-translator v0.18.1 // indirect | ||
| github.com/golang/protobuf v1.5.4 // indirect | ||
| github.com/google/go-github/v39 v39.2.0 // indirect | ||
| github.com/google/go-querystring v1.1.0 // indirect | ||
| github.com/gopherjs/gopherjs v0.0.0-20211216084454-9ae78a3fa6dd // indirect | ||
| github.com/gopherjs/gopherjs v1.17.2 // indirect | ||
| github.com/hashicorp/errwrap v1.1.0 // indirect | ||
| github.com/hashicorp/go-multierror v1.1.1 // indirect | ||
| github.com/jtolds/gls v4.20.0+incompatible // indirect | ||
| github.com/leodido/go-urn v1.2.1 // indirect | ||
| github.com/kr/fs v0.1.0 // indirect | ||
| github.com/kr/pretty v0.3.1 // indirect | ||
| github.com/kr/text v0.2.0 // indirect | ||
| github.com/leodido/go-urn v1.4.0 // indirect | ||
| github.com/pmezard/go-difflib v1.0.0 // indirect | ||
| github.com/rogpeppe/go-internal v1.9.0 // indirect | ||
| github.com/smarty/assertions v1.16.0 // indirect | ||
| github.com/smartystreets/assertions v1.2.1 // indirect | ||
| github.com/tools/godep v0.0.0-20180126220526-ce0bfadeb516 // indirect | ||
| go.uber.org/atomic v1.9.0 // indirect | ||
| go.uber.org/multierr v1.8.0 // indirect | ||
| golang.org/x/crypto v0.36.0 // indirect | ||
| golang.org/x/net v0.38.0 // indirect | ||
| golang.org/x/oauth2 v0.27.0 // indirect | ||
| google.golang.org/protobuf v1.33.0 // indirect | ||
| go.uber.org/multierr v1.11.0 // indirect | ||
| golang.org/x/crypto v0.42.0 // indirect | ||
| golang.org/x/mod v0.28.0 // indirect | ||
| golang.org/x/net v0.44.0 // indirect | ||
| golang.org/x/oauth2 v0.31.0 // indirect | ||
| golang.org/x/sync v0.17.0 // indirect | ||
| golang.org/x/sys v0.36.0 // indirect | ||
| golang.org/x/tools v0.37.0 // indirect | ||
| golang.org/x/tools/go/vcs v0.1.0-deprecated // indirect | ||
| google.golang.org/protobuf v1.34.2 // indirect | ||
| gopkg.in/go-playground/assert.v1 v1.2.1 // indirect | ||
| ) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.