Skip to content
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
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
README.md
LICENSE
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Dockerfile
.dockerignore
.git
.github/
.gitignore
.releaserc
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Bug Report
about: Report a bug encountered with ADLMFlexNetServer
labels:
- kind/bug
---
**This is a Bug Report**

<!--Required Information-->
**Problem:**


**Proposed Solution:**


**Steps to Reproduce:**


<!--Optional Information (remove the comment tags around information you would like to include)-->
<!--ADLMFlexNetServer Version:-->

<!--Additional Information:-->
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Feature Request
about: Suggest a feature or enhancement to the ADLMFlexNetServer project
labels:
- kind/feature
---
**This is a Feature Request**


**What would you like to be added**
<!-- Describe as precisely as possible how this feature/enhancement should work from the user perspective. What should be changed, etc. -->

**Why is this needed**

**Comments**
<!-- Any additional related comments that might help. Drawings/mockups would be extremely helpful (if required). -->
2 changes: 2 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Always validate all commits, and ignore the PR title
commitsOnly: true
33 changes: 33 additions & 0 deletions .github/workflows/test-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test and Release

# Run the workflow when a Pull Request is opened or when changes are pushed to main
on:
pull_request:
push:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest
steps:
# Fetch the latest commit
- name: Checkout
uses: actions/checkout@v2

# Run tests
- name: Hadolint Action
uses: brpaz/hadolint-action@v1.1.0

release:
# Only release on push to main
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
# Waits for test jobs for each Node.js version to complete
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
12 changes: 12 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"branches": [
"main"
],
"repositoryUrl": "git@github.com:haysclark/docker-adlmflexnetserver.git",
"tagFormat": "${version}",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github"
]
}
22 changes: 0 additions & 22 deletions CHANGELOG.md

This file was deleted.

81 changes: 81 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Contributor Covenant Code of Conduct

- [Our Pledge](#our-pledge)
- [Our Standards](#our-standards)
- [Our Responsibilities](#our-responsibilities)
- [Scope](#scope)
- [Enforcement](#enforcement)
- [Attribution](#attribution)

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at helpdesk@infinitedescent.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4,
available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html)

For answers to common questions about this code of conduct, see
[https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq).
30 changes: 30 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Contributing

This guide is intended for project contributors.

**Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://kcd.im/pull-request)

## Code of Conduct

Please make sure you're familiar with and follow the [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).

## Reviewing Pull Requests

1. Ensure you have locally built and tested the Docker container.

## Approving Pull Requests

1. Ensure there are no common Dockerfile pitfalls by _linting_ with [hadolint](https://github.com/hadolint/hadolint).
```bash
hadolint Dockerfile
```
1. Ensure the merge message conforms to [Conventional Commits](https://conventionalcommits.org/) spec.
1. Breaking changes? Ensure the commit message contains the text `BREAKING CHANGE:`.
1. Use "Squash and Merge". This keeps a clean history in `main`, with a full history available in Pull Requests.

## Releasing

1. A [GitHub Actions](https://github.com/features/actions) is triggered when any code is pushed to `main`. The action will `test` the build and all tests pass, it will then use [semantic-release](https://github.com/semantic-release/semantic-release#-semantic-release) to generate additionals files as well as `tagging` the branch with the new `version`.
1. Any code pushed or merged to the GitHub `main` branch will trigger a Docker build which is published to the `@latest` [DockerHub](https://hub.docker.com/) tag.
1. Any version `tag` pushed to GitHub will trigger a Docker build, and the container will be published to [DockerHub](https://hub.docker.com/) using the same version number.

51 changes: 31 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,38 +1,49 @@

FROM centos:centos6

MAINTAINER hays.clark@gmail.com

ARG NLM_URL=http://download.autodesk.com/us/support/files/network_license_manager/11_13_1_2_v2/Linux/nlm11.13.1.2_ipv4_ipv6_linux64.tar.gz
#########################################
## BUILD-TIME VARIABLES ##
#########################################
# url for Network Licence Manager
ARG NLM_URL=https://knowledge.autodesk.com/sites/default/files/file_downloads/nlm11.16.2.0_ipv4_ipv6_linux64.tar.gz
# path for temporary files
ARG TEMP_PATH=/tmp/flexnetserver

EXPOSE 2080
EXPOSE 27000-27009
#########################################
## ENVIRONMENTAL CONFIG ##
#########################################
# add the flexlm commands to $PATH
ENV PATH="$PATH:/opt/flexnetserver/"

# Ideally this list of dependancies will be trimmed down
RUN yum update -y && yum install -y \
redhat-lsb \
wget && \
yum clean all
#########################################
## RUN INSTALL SCRIPT ##
#########################################
COPY /files /usr/local/bin

RUN mkdir -p ${TEMP_PATH} && cd ${TEMP_PATH} && \
wget --progress=bar:force ${NLM_URL} && \
tar -zxvf *.tar.gz && rpm -vhi *.rpm && \
rm -rf ${TEMP_PATH}
RUN yum install -y redhat-lsb-core-4.0 wget-1.12 && yum clean all

WORKDIR $TEMP_PATH
RUN wget --progress=bar:force -- $NLM_URL
RUN tar -zxvf ./*.tar.gz
RUN rpm -vhi ./*.rpm
RUN rm -rf $TEMP_PATH

# lmadmin is required for -2 -p flag support
RUN groupadd -r lmadmin && \
useradd -r -g lmadmin lmadmin

#########################################
## VOLUMES ##
#########################################
VOLUME ["/var/flexlm"]

# add the flexlm commands to $PATH
ENV PATH="${PATH}:/opt/flexnetserver/"
#########################################
## EXPOSE PORTS ##
#########################################
EXPOSE 2080
EXPOSE 27000-27009

# do not use ROOT user
USER lmadmin

COPY entrypoint.sh /usr/local/bin/entrypoint.sh
COPY utils.sh /usr/local/bin/utils.sh

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
# no CMD, use container as if 'lmgrd'
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Hays Clark
Copyright (c) 2016-2020 Hays Clark

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading