Skip to content

Commit

Permalink
Merge pull request #43 from feloy/fix-license
Browse files Browse the repository at this point in the history
fix license + docker usage
  • Loading branch information
feloy authored Feb 14, 2024
2 parents 47828d3 + 8be9b2c commit 8055f1c
Show file tree
Hide file tree
Showing 17 changed files with 474 additions and 362 deletions.
478 changes: 201 additions & 277 deletions LICENSE

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Docker OpenShift Analyzer
# OpenShift Checker

The Docker OpenShift analyzer is a tool whose goal is to analyze a Dockerfile and highlight the directives and commands which could cause an unexpected behavior when running on an OpenShift cluster.
The OpenShift checker is a tool whose goal is to analyze a Containerfile and highlight the directives and commands which could cause an unexpected behavior when running on an OpenShift cluster.

In many cases a Dockerfile could work fine on a Kubernetes cluster and fail on OpenShift because of its security restrictions. This tool should help finding what is wrong and driving users to update their Dockerfiles to make them OpenShift compliant.
In many cases a Containerfile could work fine on a Kubernetes cluster and fail on OpenShift because of its security restrictions. This tool should help finding what is wrong and driving users to update their Containerfiles to make them OpenShift compliant.

The Dockerfile's directives and commands currently supported are listed below.
The Containerfile's directives and commands currently supported are listed below.

### User directive

Expand Down Expand Up @@ -92,7 +92,7 @@ To build and use the cli, execute

```
go build -o doa[.exe]
doa[.exe] analyze -f /your/local/project/path[/Dockerfile_name]
doa[.exe] analyze -f /your/local/project/path[/Containerfile_name]
```

Podman Desktop Extension
Expand All @@ -110,11 +110,11 @@ For information on getting started, refer to the [CONTRIBUTING instructions](CON
Feedback & Questions
====================
If you discover an issue please file a bug and we will fix it as soon as possible.
* File a bug in [GitHub Issues](https://github.com/lstocchi/docker-openshift-analyzer).
* File a bug in [GitHub Issues](https://github.com/redhat-developer/podman-desktop-image-checker-openshift-ext/issues).

License
=======
EPL 2.0, See [LICENSE](LICENSE) for more information.
Apache 2.0, See [LICENSE](LICENSE) for more information.

Acknowledgments
===============
Expand Down
20 changes: 19 additions & 1 deletion pkg/cli/analyze.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
package cli
/**********************************************************************
* Copyright (C) 2024 Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
***********************************************************************/

package cli

import (
"encoding/json"
Expand Down
20 changes: 19 additions & 1 deletion pkg/cli/cli.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
package cli
/**********************************************************************
* Copyright (C) 2024 Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
***********************************************************************/

package cli

import (
"errors"
Expand Down
27 changes: 17 additions & 10 deletions pkg/command/analyzer.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
/*******************************************************************************
* Copyright (c) 2022 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v20.html
/**********************************************************************
* Copyright (C) 2022 Red Hat, Inc.
*
* Contributors:
* Red Hat, Inc.
******************************************************************************/
package command
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
***********************************************************************/
package command

import (
"context"
Expand Down
28 changes: 18 additions & 10 deletions pkg/command/analyzer_test.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
/*******************************************************************************
* Copyright (c) 2022 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v20.html
/**********************************************************************
* Copyright (C) 2022 Red Hat, Inc.
*
* Contributors:
* Red Hat, Inc.
******************************************************************************/
package command
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
***********************************************************************/

package command

import "testing"

Expand Down
27 changes: 17 additions & 10 deletions pkg/command/expose.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
/*******************************************************************************
* Copyright (c) 2022 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v20.html
/**********************************************************************
* Copyright (C) 2022 Red Hat, Inc.
*
* Contributors:
* Red Hat, Inc.
******************************************************************************/
package command
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
***********************************************************************/
package command

import (
"context"
Expand Down
27 changes: 17 additions & 10 deletions pkg/command/from.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
/*******************************************************************************
* Copyright (c) 2023 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v20.html
/**********************************************************************
* Copyright (C) 2023 Red Hat, Inc.
*
* Contributors:
* Red Hat, Inc.
******************************************************************************/
package command
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
***********************************************************************/
package command

import (
"context"
Expand Down
27 changes: 17 additions & 10 deletions pkg/command/run.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
/*******************************************************************************
* Copyright (c) 2022 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v20.html
/**********************************************************************
* Copyright (C) 2022 Red Hat, Inc.
*
* Contributors:
* Red Hat, Inc.
******************************************************************************/
package command
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
***********************************************************************/
package command

import (
"context"
Expand Down
27 changes: 17 additions & 10 deletions pkg/command/run_test.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
/*******************************************************************************
* Copyright (c) 2022 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v20.html
/**********************************************************************
* Copyright (C) 2022 Red Hat, Inc.
*
* Contributors:
* Red Hat, Inc.
******************************************************************************/
package command
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
***********************************************************************/
package command

import (
"context"
Expand Down
27 changes: 17 additions & 10 deletions pkg/command/user.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
/*******************************************************************************
* Copyright (c) 2022 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v20.html
/**********************************************************************
* Copyright (C) 2022 Red Hat, Inc.
*
* Contributors:
* Red Hat, Inc.
******************************************************************************/
package command
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
***********************************************************************/
package command

import (
"context"
Expand Down
19 changes: 18 additions & 1 deletion pkg/decompiler/decompiler.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
package decompiler
/**********************************************************************
* Copyright (C) 2024 Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
***********************************************************************/
package decompiler

import (
"github.com/moby/buildkit/frontend/dockerfile/parser"
Expand Down
19 changes: 18 additions & 1 deletion pkg/decompiler/docker/decompiler.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
package decompiler
/**********************************************************************
* Copyright (C) 2024 Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
***********************************************************************/
package decompiler

import (
"context"
Expand Down
19 changes: 18 additions & 1 deletion pkg/decompiler/podman/decompiler.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
package decompiler
/**********************************************************************
* Copyright (C) 2024 Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
***********************************************************************/
package decompiler

import (
"context"
Expand Down
Loading

0 comments on commit 8055f1c

Please sign in to comment.