Skip to content

Commit

Permalink
Merge pull request #7 from lincbrain/ak-docker-dev
Browse files Browse the repository at this point in the history
Include Dockerfile.dev and docs to run neuroglancer dev locally
  • Loading branch information
aaronkanzer authored Oct 22, 2024
2 parents 4074c3c + 9a31a10 commit 2bfa1f1
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# to run locally:
# docker build -f Dockerfile.dev -t <some-awesome-app-name> .
# docker run -v $(pwd):/app -p 8080:8080 --rm <some-awesome-app-name>

FROM node:20.11.1

WORKDIR /app

# Copy package.json and package-lock.json for installing dependencies
COPY package*.json ./

# Install project dependencies
RUN npm install

# Copy the rest of your app's source code from your host to your image filesystem.
COPY . .

# Install project dependencies
RUN npm i

# Vue CLI serves on port 8080 by default, expose that port
EXPOSE 8080

# Command to run the app using npm
CMD ["npm", "run", "dev-server"]
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,16 @@ 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.

# Local Docker development

To control versioning and development on your local machine, please reference the `Dockerfile.dev` as a convenience.

To run the Dockerfile:

```shell
docker build -f Dockerfile.dev -t <some-awesome-app-name> .
docker run -v $(pwd):/app -p 8080:8080 --rm <some-awesome-app-name>
```

Hot-reloading should be present.

0 comments on commit 2bfa1f1

Please sign in to comment.