Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Quest <[email protected]>
  • Loading branch information
kcq committed Mar 6, 2024
1 parent de06ec7 commit 2d135ec
Show file tree
Hide file tree
Showing 217 changed files with 868 additions and 868 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ If the directory where you extracted the binaries is not in your PATH then you'l
You can also use this script to install the current release of **Mint** on Linux (x86 and ARM) and macOS (x86 and Apple Silicon)

```bash
curl -sL https://raw.githubusercontent.com/mintoolkit/mint/master/scripts/install-slim.sh | sudo -E bash -
curl -sL https://raw.githubusercontent.com/mintoolkit/mint/master/scripts/install-mint.sh | sudo -E bash -
```

### Homebrew
Expand Down
Binary file removed assets/images/dslim/sai_nt.png
Binary file not shown.
Binary file added assets/images/icons/icon_black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/icons/icon_color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions build/package/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ LABEL build-role=ca-certs
RUN apk update && apk upgrade && apk add --no-cache ca-certificates && update-ca-certificates 2>/dev/null || true

FROM scratch
LABEL app=slim
LABEL app=mint
COPY --from=ca-certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY dist_linux /bin
COPY build/package/docker/.ds.container.d3e2c84f976743bdb92a7044ef12e381 /.ds.container.d3e2c84f976743bdb92a7044ef12e381
VOLUME /bin/.slim-state
ENTRYPOINT ["/bin/slim"]
VOLUME /bin/.mint-state
ENTRYPOINT ["/bin/mint"]


6 changes: 3 additions & 3 deletions build/package/docker/Dockerfile.arm
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ LABEL build-role=ca-certs
RUN apk update && apk upgrade && apk add --no-cache ca-certificates && update-ca-certificates 2>/dev/null || true

FROM scratch
LABEL app=slim
LABEL app=mint
COPY --from=ca-certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY dist_linux_arm64 /bin
COPY build/package/docker/.ds.container.d3e2c84f976743bdb92a7044ef12e381 /.ds.container.d3e2c84f976743bdb92a7044ef12e381
VOLUME /bin/.slim-state
ENTRYPOINT ["/bin/slim"]
VOLUME /bin/.mint-state
ENTRYPOINT ["/bin/mint"]


4 changes: 2 additions & 2 deletions build/package/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

set -e

docker build --squash --rm -t slim -f Dockerfile ../../..
docker build --squash --rm -t mint -f Dockerfile ../../..
docker image prune --filter label=build-role=ca-certs -f
docker image prune --filter label=app=slim -f
docker image prune --filter label=app=mint -f
4 changes: 2 additions & 2 deletions build/package/docker/build_arm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

set -e

docker build --platform linux/arm64 -t slim-arm -f Dockerfile.arm ../../..
docker build --platform linux/arm64 -t mint-arm -f Dockerfile.arm ../../..
docker image prune --filter label=build-role=ca-certs -f
docker image prune --filter label=app=slim -f
docker image prune --filter label=app=mint -f
8 changes: 4 additions & 4 deletions build/package/docker/dockerhub_publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if hash git 2>/dev/null && [ -e $BDIR/.git ]; then
fi
popd

docker tag slim dslim/slim:$TAG
docker tag slim dslim/slim
docker push dslim/slim:$TAG
docker push dslim/slim
docker tag mint mintoolkit/mint:$TAG
docker tag mint mintoolkit/mint
docker push mintoolkit/mint:$TAG
docker push mintoolkit/mint
8 changes: 4 additions & 4 deletions build/package/docker/dockerhub_publish_arm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if hash git 2>/dev/null && [ -e $BDIR/.git ]; then
fi
popd

docker tag slim-arm dslim/slim-arm:$TAG
docker tag slim-arm dslim/slim-arm
docker push dslim/slim-arm:$TAG
docker push dslim/slim-arm
docker tag mint-arm mintoolkit/mint-arm:$TAG
docker tag mint-arm mintoolkit/mint-arm
docker push mintoolkit/mint-arm:$TAG
docker push mintoolkit/mint-arm
36 changes: 18 additions & 18 deletions build/package/rpm/slim.spec
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
%global go_version 1.18.2

Name: slim
Name: mint
Version: 1.40.6
Release: 1%{?dist}
Summary: Slim Toolkit helps you make your containers better, smaller, and secure
Summary: minT(oolkit) helps you make your containers better, smaller, and secure
License: Apache-2.0
BuildRequires: golang >= %{go_version}
URL: https://github.com/slimtoolkit/slim
Source0: https://github.com/slimtoolkit/slim/archive/refs/tags/%{version}.tar.gz
URL: https://github.com/mintoolkit/mint
Source0: https://github.com/mintoolkit/mint/archive/refs/tags/%{version}.tar.gz

%define debug_package %{nil}

%prep
%autosetup

%description
Slim Toolkit helps you make your containers better, smaller, and secure
minT(oolkit) helps you make your containers better, smaller, and secure

%ifarch x86_64
%define goarch amd64
Expand All @@ -29,27 +29,27 @@ Slim Toolkit helps you make your containers better, smaller, and secure
%define goarch arm
%endif

%global slim_version %(git describe --tags --always)
%global slim_revision %(git rev-parse HEAD)
%global slim_buildtime %(date '+%Y-%m-%d_%I:%M:%''S')
%global slim_ldflags -s -w -X github.com/docker-slim/docker-slim/pkg/version.appVersionTag=%{slim_version} -X github.com/docker-slim/docker-slim/pkg/version.appVersionRev=%{slim_revision} -X github.com/docker-slim/docker-slim/pkg/version.appVersionTime=%{slim_buildtime}
%global mint_version %(git describe --tags --always)
%global mint_revision %(git rev-parse HEAD)
%global mint_buildtime %(date '+%Y-%m-%d_%I:%M:%''S')
%global mint_ldflags -s -w -X github.com/mintoolkit/mint/pkg/version.appVersionTag=%{mint_version} -X github.com/mintoolkit/mint/pkg/version.appVersionRev=%{mint_revision} -X github.com/mintoolkit/mint/pkg/version.appVersionTime=%{mint_buildtime}

%build
export CGO_ENABLED=0
go generate github.com/docker-slim/docker-slim/pkg/appbom
go generate github.com/mintoolkit/mint/pkg/appbom
mkdir dist_linux
GOOS=linux GOARCH=%{goarch} go build -mod=vendor -trimpath -ldflags="%{slim_ldflags}" -a -tags 'netgo osusergo' -o "dist_linux/" ./cmd/slim/...
GOOS=linux GOARCH=%{goarch} go build -mod=vendor -trimpath -ldflags="%{slim_ldflags}" -a -tags 'netgo osusergo' -o "dist_linux/" ./cmd/slim-sensor/...
GOOS=linux GOARCH=%{goarch} go build -mod=vendor -trimpath -ldflags="%{mint_ldflags}" -a -tags 'netgo osusergo' -o "dist_linux/" ./cmd/mint/...
GOOS=linux GOARCH=%{goarch} go build -mod=vendor -trimpath -ldflags="%{mint_ldflags}" -a -tags 'netgo osusergo' -o "dist_linux/" ./cmd/mint-sensor/...

%install
install -d -m 755 %{buildroot}%{_bindir}
install -d -m 755 %{buildroot}%{_bindir}
install -d -m 755 %{buildroot}/usr/share/doc/slim/
install -d -m 755 %{buildroot}/usr/share/licenses/slim/
install -d -m 755 %{buildroot}/usr/share/doc/mint/
install -d -m 755 %{buildroot}/usr/share/licenses/mint/
install -m 755 dist_linux/%{name} %{buildroot}%{_bindir}
install -m 755 dist_linux/%{name}-sensor %{buildroot}%{_bindir}
install -m 644 README.md %{buildroot}/usr/share/doc/slim/README.md
install -m 644 LICENSE %{buildroot}/usr/share/licenses/slim/LICENSE
install -m 644 README.md %{buildroot}/usr/share/doc/mint/README.md
install -m 644 LICENSE %{buildroot}/usr/share/licenses/mint/LICENSE

%post
%{__ln_s} -f %{_bindir}/%{name} %{_bindir}/docker-slim
Expand All @@ -59,5 +59,5 @@ chmod a+x %{_bindir}/%{name}-sensor
%files
%{_bindir}/%{name}
%{_bindir}/%{name}-sensor
%doc /usr/share/doc/slim/README.md
%license /usr/share/licenses/slim/LICENSE
%doc /usr/share/doc/mint/README.md
%license /usr/share/licenses/mint/LICENSE
2 changes: 1 addition & 1 deletion cmd/slim-sensor/main.go → cmd/mint-sensor/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/slimtoolkit/slim/pkg/app/sensor"
"github.com/mintoolkit/mint/pkg/app/sensor"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/slim/main.go → cmd/mint/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package main
import (
"os"

"github.com/slimtoolkit/slim/pkg/app/master"
"github.com/mintoolkit/mint/pkg/app/master"
)

func main() {
if len(os.Args) > 1 && os.Args[1] == "slim" {
if len(os.Args) > 1 && os.Args[1] == "mint" {
//hack to handle plugin invocations
os.Args = append([]string{os.Args[0]}, os.Args[2:]...)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/slimtoolkit/slim
module github.com/mintoolkit/mint

go 1.21

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/constants.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package app

const (
DefaultArtifactsDirPath = "/opt/_slim/artifacts"
DefaultArtifactsDirPath = "/opt/_mint/artifacts"
ArtifactFilesDirName = "files"
)
11 changes: 3 additions & 8 deletions pkg/app/execontext.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"github.com/fatih/color"
log "github.com/sirupsen/logrus"

"github.com/slimtoolkit/slim/pkg/consts"
"github.com/slimtoolkit/slim/pkg/util/fsutil"
v "github.com/slimtoolkit/slim/pkg/version"
"github.com/mintoolkit/mint/pkg/consts"
"github.com/mintoolkit/mint/pkg/util/fsutil"
v "github.com/mintoolkit/mint/pkg/version"
)

const (
Expand Down Expand Up @@ -393,11 +393,6 @@ func ShowCommunityInfo(outputFormat string) {
Message: "Join the Discord server to ask questions or to share your feedback",
Info: consts.CommunityDiscord,
},
{
App: consts.AppName,
Message: "Join the Gitter channel to ask questions or to share your feedback",
Info: consts.CommunityGitter,
},
}

switch outputFormat {
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/master/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

log "github.com/sirupsen/logrus"

"github.com/slimtoolkit/slim/pkg/app/master/signals"
"github.com/mintoolkit/mint/pkg/app/master/signals"
)

// Run starts the master app
Expand Down
8 changes: 4 additions & 4 deletions pkg/app/master/builder/image_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"path/filepath"
"strings"

"github.com/slimtoolkit/slim/pkg/app/master/config"
"github.com/slimtoolkit/slim/pkg/consts"
"github.com/slimtoolkit/slim/pkg/docker/dockerfile"
"github.com/slimtoolkit/slim/pkg/util/fsutil"
"github.com/mintoolkit/mint/pkg/app/master/config"
"github.com/mintoolkit/mint/pkg/consts"
"github.com/mintoolkit/mint/pkg/docker/dockerfile"
"github.com/mintoolkit/mint/pkg/util/fsutil"

docker "github.com/fsouza/go-dockerclient"
log "github.com/sirupsen/logrus"
Expand Down
58 changes: 29 additions & 29 deletions pkg/app/master/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,39 @@ import (
log "github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"

"github.com/slimtoolkit/slim/pkg/app"
"github.com/slimtoolkit/slim/pkg/app/master/command"
"github.com/slimtoolkit/slim/pkg/app/master/command/appbom"
"github.com/slimtoolkit/slim/pkg/app/master/command/build"
//"github.com/slimtoolkit/slim/pkg/app/master/command/containerize"
//"github.com/slimtoolkit/slim/pkg/app/master/command/convert"
"github.com/slimtoolkit/slim/pkg/app/master/command/debug"
"github.com/slimtoolkit/slim/pkg/app/master/command/dockerclipm"
//"github.com/slimtoolkit/slim/pkg/app/master/command/edit"
"github.com/slimtoolkit/slim/pkg/app/master/command/help"
"github.com/slimtoolkit/slim/pkg/app/master/command/images"
"github.com/slimtoolkit/slim/pkg/app/master/command/install"
"github.com/slimtoolkit/slim/pkg/app/master/command/lint"
"github.com/slimtoolkit/slim/pkg/app/master/command/merge"
"github.com/slimtoolkit/slim/pkg/app/master/command/probe"
"github.com/slimtoolkit/slim/pkg/app/master/command/profile"
"github.com/slimtoolkit/slim/pkg/app/master/command/registry"
"github.com/slimtoolkit/slim/pkg/app/master/command/run"
//"github.com/slimtoolkit/slim/pkg/app/master/command/server"
"github.com/slimtoolkit/slim/pkg/app/master/command/update"
"github.com/slimtoolkit/slim/pkg/app/master/command/version"
"github.com/slimtoolkit/slim/pkg/app/master/command/vulnerability"
"github.com/slimtoolkit/slim/pkg/app/master/command/xray"
"github.com/slimtoolkit/slim/pkg/app/master/config"
"github.com/slimtoolkit/slim/pkg/system"
"github.com/slimtoolkit/slim/pkg/util/fsutil"
v "github.com/slimtoolkit/slim/pkg/version"
"github.com/mintoolkit/mint/pkg/app"
"github.com/mintoolkit/mint/pkg/app/master/command"
"github.com/mintoolkit/mint/pkg/app/master/command/appbom"
"github.com/mintoolkit/mint/pkg/app/master/command/build"
//"github.com/mintoolkit/mint/pkg/app/master/command/containerize"
//"github.com/mintoolkit/mint/pkg/app/master/command/convert"
"github.com/mintoolkit/mint/pkg/app/master/command/debug"
"github.com/mintoolkit/mint/pkg/app/master/command/dockerclipm"
//"github.com/mintoolkit/mint/pkg/app/master/command/edit"
"github.com/mintoolkit/mint/pkg/app/master/command/help"
"github.com/mintoolkit/mint/pkg/app/master/command/images"
"github.com/mintoolkit/mint/pkg/app/master/command/install"
"github.com/mintoolkit/mint/pkg/app/master/command/lint"
"github.com/mintoolkit/mint/pkg/app/master/command/merge"
"github.com/mintoolkit/mint/pkg/app/master/command/probe"
"github.com/mintoolkit/mint/pkg/app/master/command/profile"
"github.com/mintoolkit/mint/pkg/app/master/command/registry"
"github.com/mintoolkit/mint/pkg/app/master/command/run"
//"github.com/mintoolkit/mint/pkg/app/master/command/server"
"github.com/mintoolkit/mint/pkg/app/master/command/update"
"github.com/mintoolkit/mint/pkg/app/master/command/version"
"github.com/mintoolkit/mint/pkg/app/master/command/vulnerability"
"github.com/mintoolkit/mint/pkg/app/master/command/xray"
"github.com/mintoolkit/mint/pkg/app/master/config"
"github.com/mintoolkit/mint/pkg/system"
"github.com/mintoolkit/mint/pkg/util/fsutil"
v "github.com/mintoolkit/mint/pkg/version"
)

// Main/driver app CLI constants
const (
AppName = "slim"
AppUsage = "inspect, optimize and debug your containers!"
AppName = "mint"
AppUsage = "inspect, minify, customize, secure and debug your containers!"
)

func registerCommands() {
Expand Down
4 changes: 2 additions & 2 deletions pkg/app/master/command/appbom/cli.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package appbom

import (
"github.com/slimtoolkit/slim/pkg/app"
"github.com/slimtoolkit/slim/pkg/app/master/command"
"github.com/mintoolkit/mint/pkg/app"
"github.com/mintoolkit/mint/pkg/app/master/command"

"github.com/urfave/cli/v2"
)
Expand Down
6 changes: 3 additions & 3 deletions pkg/app/master/command/appbom/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package appbom
import (
//log "github.com/sirupsen/logrus"

"github.com/slimtoolkit/slim/pkg/app"
"github.com/slimtoolkit/slim/pkg/app/master/command"
"github.com/slimtoolkit/slim/pkg/appbom"
"github.com/mintoolkit/mint/pkg/app"
"github.com/mintoolkit/mint/pkg/app/master/command"
"github.com/mintoolkit/mint/pkg/appbom"
)

const appName = command.AppName
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/master/command/appbom/init/init.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package init

import (
"github.com/slimtoolkit/slim/pkg/app/master/command/appbom"
"github.com/mintoolkit/mint/pkg/app/master/command/appbom"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/master/command/appbom/register.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package appbom

import (
"github.com/slimtoolkit/slim/pkg/app/master/command"
"github.com/mintoolkit/mint/pkg/app/master/command"
)

func RegisterCommand() {
Expand Down
8 changes: 4 additions & 4 deletions pkg/app/master/command/build/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
log "github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"

"github.com/slimtoolkit/slim/pkg/app"
"github.com/slimtoolkit/slim/pkg/app/master/command"
"github.com/slimtoolkit/slim/pkg/app/master/config"
"github.com/slimtoolkit/slim/pkg/artifact"
"github.com/mintoolkit/mint/pkg/app"
"github.com/mintoolkit/mint/pkg/app/master/command"
"github.com/mintoolkit/mint/pkg/app/master/config"
"github.com/mintoolkit/mint/pkg/artifact"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions pkg/app/master/command/build/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"strings"

"github.com/slimtoolkit/slim/pkg/app/master/command"
"github.com/slimtoolkit/slim/pkg/app/master/config"
"github.com/mintoolkit/mint/pkg/app/master/command"
"github.com/mintoolkit/mint/pkg/app/master/config"

log "github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
Expand Down
Loading

0 comments on commit 2d135ec

Please sign in to comment.