Skip to content

Commit

Permalink
Merge 75deb3a into 74e717f
Browse files Browse the repository at this point in the history
  • Loading branch information
tdtds committed Jun 12, 2020
2 parents 74e717f + 75deb3a commit fb1d0a8
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 11 deletions.
8 changes: 8 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM ruby:2
LABEL maintainer "@tdtds <t@tdtds.jp>"

RUN apt update && apt install -y apt-utils libidn11-dev sqlite3 libsqlite3-dev
RUN mkdir -p /workspace
WORKDIR /workspace
EXPOSE 9292
CMD "/workspace/.devcontainer/run-app.sh"
4 changes: 2 additions & 2 deletions misc/docker-devel/README.md → .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
## how to build

```
% docker build -t tdiary-devel misc/docker-devel
% docker build -t tdiary-devel .devcontainer
```

## how to run

```
% docker run -v $(pwd):/usr/src/app -p 9292:9292 -it --rm tdiary-devel
% docker run -v $(pwd):/workspace -p 9292:9292 -it --rm tdiary-devel
```

or debugging `contrib` in the parent directory:
Expand Down
34 changes: 34 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.122.1/containers/docker-existing-dockerfile
{
"name": "Existing Dockerfile",

// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",

// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerFile": "Dockerfile",

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": null
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": []

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [9292],

// Uncomment the next line to run commands after the container is created - for example installing curl.
// "postCreateCommand": "apt-get update && apt-get install -y curl",

// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],

// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],

// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
}
1 change: 0 additions & 1 deletion misc/docker-devel/run-app.sh → .devcontainer/run-app.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
cd /usr/src/app
if [ ! -f tdiary.conf ]; then
cp tdiary.conf.beginner tdiary.conf
fi
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ doc/*.html
/Gemfile.local
spec/javascripts/lib
node_modules
public/assets
8 changes: 0 additions & 8 deletions misc/docker-devel/Dockerfile

This file was deleted.

0 comments on commit fb1d0a8

Please sign in to comment.